ipb-halle / MetFrag

Repo hosting the MetFrag website
https://ipb-halle.github.io/MetFrag/
10 stars 5 forks source link

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 20 #17

Closed rccc closed 3 years ago

rccc commented 3 years ago

Is there a way to guess what is the problem here ?

PeakListPath = /.../MetFrag/71/9181-142166-ms2.csv
MetFragDatabaseType = LocalCSV
LocalDatabasePath = /.../MetFrag/71/9181-db.csv
NeutralPrecursorMass = 217.03525395
FragmentPeakMatchAbsoluteMassDeviation = 0
FragmentPeakMatchRelativeMassDeviation = 2
PrecursorIonMode = 125
IsPositiveIonMode = True
MetFragScoreTypes = FragmenterScore
MetFragScoreWeights = 1.0
MetFragCandidateWriter = ExtendedFragmentsXLS
SampleName = 9181-142166-metfrag_result
MaximumTreeDepth = 2
MetFragPreProcessingCandidateFilter = UnconnectedCompoundFilter
MetFragPostProcessingCandidateFilter = InChIKeyFilter
NumberThreads = 1
ResultsPath = /.../MetFrag/71/result

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 20 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:458) at de.ipbhalle.metfraglib.parameter.Constants.getIonisationChargeByNominalMassDifference(Constants.java:302) at de.ipbhalle.metfraglib.parameter.SettingsChecker.checkIonModeSettings(SettingsChecker.java:154) at de.ipbhalle.metfraglib.parameter.SettingsChecker.check(SettingsChecker.java:15) at de.ipbhalle.metfrag.commandline.CommandLineTool.main(CommandLineTool.java:89)

schymane commented 3 years ago

PrecursorIonMode = 125 ... what adduct is that meant to correspond to? It's a very high number ...

rccc commented 3 years ago

@schymane : Thanks a lot, you are right, i corrected this and it works fine. I close the issue.