Skip to content

Commit

Permalink
Merge pull request #94 from PRIDE-Archive/mzML1.2.0
Browse files Browse the repository at this point in the history
supporting mzML 1.2.0
  • Loading branch information
ypriverol authored Jun 30, 2020
2 parents a9fae3f + 7dfb8e0 commit aa8b209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public class FileScanAndValidationTask extends TaskAdapter<DataFileValidationMes

private static final Logger logger = LoggerFactory.getLogger(FileScanAndValidationTask.class);

private static final String MZIDENTML_ACCEPTED_VERSION = "1.1.0";
private static final String MZIDENTML_ACCEPTED_VERSION_1_1_0 = "1.1.0";
private static final String MZIDENTML_ACCEPTED_VERSION_1_2_0 = "1.2.0";
public static final Pattern MZIDENTML_PEAK_LIST_FILE_PATTERN = Pattern.compile("^[^<]*<SpectraData[^>]*location=\"([^\"]+)\"[^>]*>.*$");
public static final String MZIDENTML_PEAK_LIST_FILE_END = "</SpectraData>";
public static final String PRIDEXML_SAMPLE_DESCRIPTION_BEGIN = "<sampleDescription";
Expand Down Expand Up @@ -738,7 +739,7 @@ private List<DataFile> runMzIdentMLVersionValidation(List<DataFile> dataFiles) t
boolean correctVersion = false;
for (int i = 0; i < 5; i++) {
String line = fileReader.readLine();
if (line.contains("version=\"" + MZIDENTML_ACCEPTED_VERSION + "\"")) {
if (line.contains("version=\"" + MZIDENTML_ACCEPTED_VERSION_1_1_0 + "\"") || line.contains("version=\"" + MZIDENTML_ACCEPTED_VERSION_1_2_0 + "\"")) {
correctVersion = true;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static String getMultipleResultFileFormatWarning(String formatA, String f
public static String getInvalidMzIdentMLVersionWarning(List<DataFile> mzIdentMLFiles) {
StringBuilder errMsg = new StringBuilder();
errMsg.append("<html>");
errMsg.append("<b>The following mzIdentML are not version 1.1.0 </b><br/>");
errMsg.append("<b>The following mzIdentML are not version 1.1.0 or 1.2.0 </b><br/>");
for (DataFile mzIdentMLFile : mzIdentMLFiles) {
errMsg.append("<li>");
errMsg.append(mzIdentMLFile.getFile().getName());
Expand Down

0 comments on commit aa8b209

Please sign in to comment.