Skip to content

Commit

Permalink
Merge pull request #4 from sureshhewabi/master
Browse files Browse the repository at this point in the history
more validation output fields added
  • Loading branch information
ypriverol authored Jan 28, 2021
2 parents 762a404 + 2a8da95 commit 246d26c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Validation an mzIdentML

```
$ java -jar submission-tool-validator-{version}-bin.jar -v -mzid /path/to/data/file.mzid
$ java -jar submission-tool-validator-{version}-bin.jar -v -mzid /path/to/data/file.mzid -peak /path/to/data/file.mgf
$ java -jar submission-tool-validator-{version}-bin.jar -v -mzid /path/to/data/file.mzid -peaks /path/to/data/file1.mgf##/path/to/data/file2.mgf
```


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.toolsuite</groupId>
<artifactId>submission-tool-validator</artifactId>
<name>submission-tool-validator</name>
<version>1.0.0</version>
<version>1.0.2</version>
<packaging>jar</packaging>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public String toString() {
for(Map.Entry er: errors)
error.append(er.getKey().toString()).append(" == Level Error: ").append(er.getValue()).append(" ==\n");
if(errors.isEmpty()){
error.append("Errors found: None").append("\n");
error.append("Status : Valid").append("\n");
}else{
error.append("Status : Invalid").append("\n");
}
return error.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
*/
public class ResultReport extends Report {

private String assayFile;
private long fileSize;
private int numberOfProteins;
private int numberOfPeptides;
private int numberOfPSMs;
private int numberOfPeakFiles;
private boolean isValidSchema = false;

public ResultReport() {

Expand All @@ -30,11 +33,28 @@ public void setNumberOfPeakFiles(int numberOfPeakFiles) {
this.numberOfPeakFiles = numberOfPeakFiles;
}

public void setValidSchema(boolean validSchema) {
isValidSchema = validSchema;
}

public void setAssayFile(String assayFile) {
this.assayFile = assayFile;
}

public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}

@Override
public String toString() {
return super.toString() + "Number of reported proteins : " + numberOfProteins + "\n" +
return super.toString() +
"Assay file : " + assayFile + "\n" +
"Assay file size: " + fileSize + "\n" +
"Valid Schema : " + isValidSchema + "\n" +
"Number of reported proteins : " + numberOfProteins + "\n" +
"Number of reported peptides : " + numberOfPeptides + "\n" +
"Number of reported PSMs : " + numberOfPSMs + "\n" +
"Number of peak files : " + numberOfPeakFiles + "\n";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ public IReport validate() {
int numPSMs = piaCompiler.getNrPeptideSpectrumMatches();
int numPeakFiles = spectrumFiles.size();

((ResultReport) report).setNumberOfPeptides(numPeptides);
((ResultReport) report).setAssayFile(file.getName());
((ResultReport) report).setFileSize(file.getTotalSpace());
((ResultReport) report).setNumberOfProteins(numProteins);
((ResultReport) report).setNumberOfPeptides(numPeptides);
((ResultReport) report).setNumberOfPSMs(numPSMs);
((ResultReport) report).setNumberOfPeakFiles(numPeakFiles);
((ResultReport) report).setValidSchema(true);
return report;
}

Expand Down

0 comments on commit 246d26c

Please sign in to comment.