MSGFPlus / msgfplus

MS-GF+ (aka MSGF+ or MSGFPlus) performs peptide identification by scoring MS/MS spectra against peptides derived from a protein sequence database.
Other
76 stars 36 forks source link

MSGFPlus error message for empty fasta input #29

Open bernt-matthias opened 6 years ago

bernt-matthias commented 6 years ago

I got the following error (when using MSGFPlus through OpenMS' MSGFPlusAdapter)

java.lang.ArrayIndexOutOfBoundsException: 1
    at edu.ucsd.msjava.msdbsearch.CompactFastaSequence.getByteAt(CompactFastaSequence.java:163)
    at edu.ucsd.msjava.msdbsearch.CompactSuffixArray.createSuffixArrayFiles(CompactSuffixArray.java:280)
    at edu.ucsd.msjava.msdbsearch.CompactSuffixArray.(CompactSuffixArray.java:69)
    at edu.ucsd.msjava.msdbsearch.CompactSuffixArray.(CompactSuffixArray.java:89)
    at edu.ucsd.msjava.ui.MSGFPlus.runMSGFPlus(MSGFPlus.java:207)
    at edu.ucsd.msjava.ui.MSGFPlus.runMSGFPlus(MSGFPlus.java:105)
    at edu.ucsd.msjava.ui.MSGFPlus.main(MSGFPlus.java:56)

which seems to be caused by an empty fasta input file. Would it be possible to create a meaningful error message in this case?

FarmGeek4Life commented 5 years ago

Note for future reference: the exception reports an error at index 1, so either an empty fasta file, or an error occurred in parsing the fasta file.

timosachsenberg commented 5 years ago

Would be great to catch the exception and output a meaningful error message.