Skip to content

Commit

Permalink
Merge pull request #102 from PRIDE-Archive/mzTabBug
Browse files Browse the repository at this point in the history
Mz tab bug
  • Loading branch information
ypriverol authored Aug 28, 2020
2 parents c5dd705 + 58d99ad commit da5fe8c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PX Submission Tool is a desktop application to submit the data to proteomeXchang

# Quick Download

[<img src="https://raw.githubusercontent.com/PRIDE-Toolsuite/pride-inspector/master/wiki/download.png">](https://github.com/PRIDE-Archive/px-submission-tool/releases/download/2.4.18/px-submission-tool-2.4.18.zip)
[<img src="https://raw.githubusercontent.com/PRIDE-Toolsuite/pride-inspector/master/wiki/download.png">](https://github.com/PRIDE-Archive/px-submission-tool/releases/download/2.5.0/px-submission-tool-2.5.0.zip)

Please unzip and run `px-submission-tool-<version number>.jar` file!

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>uk.ac.ebi.pride.px</groupId>
<artifactId>px-submission-tool</artifactId>
<packaging>jar</packaging>
<version>2.4.18</version>
<version>2.5.0</version>
<name>px-submission-tool</name>
<url>https://github.com/proteomexchange/px-submission-tool</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,32 @@
import uk.ac.ebi.pride.data.validation.SubmissionValidator;
import uk.ac.ebi.pride.data.validation.ValidationMessage;
import uk.ac.ebi.pride.data.validation.ValidationReport;
import uk.ac.ebi.pride.gui.util.*;
import uk.ac.ebi.pride.gui.util.Constant;
import uk.ac.ebi.pride.gui.util.DataFileValidationMessage;
import uk.ac.ebi.pride.gui.util.PrideConverterSupport;
import uk.ac.ebi.pride.gui.util.ValidationState;
import uk.ac.ebi.pride.gui.util.WarningMessageGenerator;
import uk.ac.ebi.pride.jaxb.model.CvParam;
import uk.ac.ebi.pride.jaxb.model.SampleDescription;
import uk.ac.ebi.pride.jaxb.xml.unmarshaller.PrideXmlUnmarshaller;
import uk.ac.ebi.pride.jaxb.xml.unmarshaller.PrideXmlUnmarshallerFactory;
import uk.ac.ebi.pride.toolsuite.gui.task.TaskAdapter;

import javax.xml.bind.JAXBException;
import java.io.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -341,17 +355,18 @@ private Map<DataFile, Set<String>> checkMzTabFileReferences(List<DataFile> mzTab
errorEntry = mzTabFile.getMzTabDocument().getMetaData().getMsRunEntry(msRunIndex).getLocation().toString();
} else {
// The file is in the list of files part of the current submission process
// Check that the referenced file is a Raw file
if (dataFiles.get(referencedFile.toLowerCase()).getFileType() != ProjectFileType.RAW) {
// Check that the referenced file is a Peak List / RAW file
ProjectFileType referencedDataFileType = dataFiles.get(referencedFile.toLowerCase()).getFileType();
if (referencedDataFileType != ProjectFileType.PEAK && referencedDataFileType != ProjectFileType.RAW) {
// Flag the error
errorFlagged = true;
// Log the error
errorLogMsg = "mzTab file '" + mzTabFile.getFilePath()
+ "' references NON-RAW file '"
+ "' references NON-Peak List/RAW file '"
+ referencedFile
+ "', which is NOT ALLOWED";
// Report the error
errorEntry = "NON-RAW file '"
errorEntry = "NON-Peak List/RAW referenced file '"
+ referencedFile
+ "', is NOT ALLOWED";
}
Expand Down

0 comments on commit da5fe8c

Please sign in to comment.