Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when searching mzML converted from mzXML. #21

Closed
gutierrezm00 opened this issue Jul 30, 2020 · 5 comments
Closed

Error when searching mzML converted from mzXML. #21

gutierrezm00 opened this issue Jul 30, 2020 · 5 comments

Comments

@gutierrezm00
Copy link

gutierrezm00 commented Jul 30, 2020

Hello! My name is Mat.

As the title states, I'm unable to get Morpheus to perform when I provide an mzML that has been converted to mzML format from mzXML using ProteoWizards msconvert function.

I'm able to obtain correct results and function if I convert a .RAW file directly into an mzML, but not if the file is converted to an mzXML first, and then into mzml. This solution is inadequate for me, as I do not always have access to a .RAW file for conversion into mzml.

I've attached a drive folder with the necessary files to recreate this issue in the link below. There is the .RAW file, and two mzmls named raw_to.mzML and raw_to_mzXML_to.mzML. Per their names, the raw_to.mzML was converted directly to mzml from the RAW file, and the raw_to_mzXML_to.mzML was converted to mzXML first, and then mzML. Additionally, there is a .fasta associated with the data.

https://drive.google.com/drive/folders/1uRu-td8r2sD9iqcPQ8Tthf3SIdO8OQFc?usp=sharing

I'm not experienced with c#, but i've provided the stack trace below.

StackTrace

Starting...
Initializing...
Starting raw_to_mzXML_to.mzML...
Extracting and preprocessing MS/MS spectra...
1%...2%...3%...4%...5%...6%...7%...8%...9%...10%...11%...12%...13%...14%...15%...16%...17%...18%...19%...20%...21%...22%...23%...24%...25%...26%...27%...28%...29%...30%...31%...32%...33%...34%...35%...36%...37%...38%...39%...40%...41%...42%...43%...44%...45%...46%...47%...48%...49%...50%...51%...52%...53%...54%...55%...56%...57%...58%...59%...60%...61%...62%...63%...64%...65%...66%...67%...68%...69%...70%...71%...72%...73%...74%...75%...76%...77%...78%...79%...80%...81%...82%...83%...84%...85%...86%...87%...88%...89%...90%...91%...92%...93%...94%...95%...96%...97%...98%...99%...100%
Searching MS/MS spectra...
System.AggregateException: One or more errors occurred. (The given key 'collision energy' was not present in the dictionary.) (The given key 'collision energy' was not present in the dictionary.) (The given key 'collision energy' was not present in the dictionary.) (The given key 'collision energy' was not present in the dictionary.) ---> System.Collections.Generic.KeyNotFoundException: The given key 'collision energy' was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <c453bf849bb84e719dbec0475e99db95>:0 
  at Morpheus.ProductTypes.get_Item (System.String fragmentationMethod) [0x00000] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch.ScoreMatch (Morpheus.MassTolerance productMassTolerance) [0x00016] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch..ctor (Morpheus.TandemMassSpectrum spectrum, Morpheus.Peptide peptide, Morpheus.MassTolerance productMassTolerance) [0x00070] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.DatabaseSearcher+<DoSearch>c__AnonStorey1.<>m__0 (Morpheus.Protein protein) [0x001f8] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x00103] in <c453bf849bb84e719dbec0475e99db95>:0 
--- End of stack trace from previous location where exception was thrown ---

  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x0025f] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica`1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) [0x00000] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica.Execute () [0x00023] in <c453bf849bb84e719dbec0475e99db95>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.TaskReplicator.Run[TState] (System.Threading.Tasks.TaskReplicator+ReplicatableUserAction`1[TState] action, System.Threading.Tasks.ParallelOptions options, System.Boolean stopOnFirstFailure) [0x0005b] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal] (System.Collections.Concurrent.Partitioner`1[TSource] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] simpleBody, System.Action`2[T1,T2] bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) [0x0017c] in <c453bf849bb84e719dbec0475e99db95>:0 
--- End of stack trace from previous location where exception was thrown ---

  at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException (System.Collections.ICollection exceptions, System.Threading.CancellationToken cancelToken, System.Exception otherException) [0x0000b] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal] (System.Collections.Concurrent.Partitioner`1[TSource] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] simpleBody, System.Action`2[T1,T2] bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) [0x001db] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (System.Collections.Generic.IEnumerable`1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body, System.Action`2[T1,T2] bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit, System.Action`1[T] localFinally) [0x00050] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.Parallel.ForEach[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body) [0x0002a] in <c453bf849bb84e719dbec0475e99db95>:0 
  at Morpheus.DatabaseSearcher.DoSearch () [0x0101f] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
---> (Inner Exception #0) System.Collections.Generic.KeyNotFoundException: The given key 'collision energy' was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <c453bf849bb84e719dbec0475e99db95>:0 
  at Morpheus.ProductTypes.get_Item (System.String fragmentationMethod) [0x00000] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch.ScoreMatch (Morpheus.MassTolerance productMassTolerance) [0x00016] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch..ctor (Morpheus.TandemMassSpectrum spectrum, Morpheus.Peptide peptide, Morpheus.MassTolerance productMassTolerance) [0x00070] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.DatabaseSearcher+<DoSearch>c__AnonStorey1.<>m__0 (Morpheus.Protein protein) [0x001f8] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x00103] in <c453bf849bb84e719dbec0475e99db95>:0 
--- End of stack trace from previous location where exception was thrown ---

  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x0025f] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica`1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) [0x00000] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica.Execute () [0x00023] in <c453bf849bb84e719dbec0475e99db95>:0 <---

---> (Inner Exception #1) System.Collections.Generic.KeyNotFoundException: The given key 'collision energy' was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <c453bf849bb84e719dbec0475e99db95>:0 
  at Morpheus.ProductTypes.get_Item (System.String fragmentationMethod) [0x00000] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch.ScoreMatch (Morpheus.MassTolerance productMassTolerance) [0x00016] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch..ctor (Morpheus.TandemMassSpectrum spectrum, Morpheus.Peptide peptide, Morpheus.MassTolerance productMassTolerance) [0x00070] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.DatabaseSearcher+<DoSearch>c__AnonStorey1.<>m__0 (Morpheus.Protein protein) [0x001f8] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x00103] in <c453bf849bb84e719dbec0475e99db95>:0 
--- End of stack trace from previous location where exception was thrown ---

  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x0025f] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica`1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) [0x00000] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica.Execute () [0x00023] in <c453bf849bb84e719dbec0475e99db95>:0 <---

---> (Inner Exception #2) System.Collections.Generic.KeyNotFoundException: The given key 'collision energy' was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <c453bf849bb84e719dbec0475e99db95>:0 
  at Morpheus.ProductTypes.get_Item (System.String fragmentationMethod) [0x00000] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch.ScoreMatch (Morpheus.MassTolerance productMassTolerance) [0x00016] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch..ctor (Morpheus.TandemMassSpectrum spectrum, Morpheus.Peptide peptide, Morpheus.MassTolerance productMassTolerance) [0x00070] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.DatabaseSearcher+<DoSearch>c__AnonStorey1.<>m__0 (Morpheus.Protein protein) [0x001f8] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x00103] in <c453bf849bb84e719dbec0475e99db95>:0 
--- End of stack trace from previous location where exception was thrown ---

  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x0025f] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica`1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) [0x00000] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica.Execute () [0x00023] in <c453bf849bb84e719dbec0475e99db95>:0 <---

---> (Inner Exception #3) System.Collections.Generic.KeyNotFoundException: The given key 'collision energy' was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <c453bf849bb84e719dbec0475e99db95>:0 
  at Morpheus.ProductTypes.get_Item (System.String fragmentationMethod) [0x00000] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch.ScoreMatch (Morpheus.MassTolerance productMassTolerance) [0x00016] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.PeptideSpectrumMatch..ctor (Morpheus.TandemMassSpectrum spectrum, Morpheus.Peptide peptide, Morpheus.MassTolerance productMassTolerance) [0x00070] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at Morpheus.DatabaseSearcher+<DoSearch>c__AnonStorey1.<>m__0 (Morpheus.Protein protein) [0x001f8] in <c19cd36571be4e1c82621f0bf4b72e61>:0 
  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x00103] in <c453bf849bb84e719dbec0475e99db95>:0 
--- End of stack trace from previous location where exception was thrown ---

  at System.Threading.Tasks.Parallel+<>c__DisplayClass44_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 (System.Collections.IEnumerator& partitionState, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) [0x0025f] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica`1[TState].ExecuteAction (System.Boolean& yieldedBeforeCompletion) [0x00000] in <c453bf849bb84e719dbec0475e99db95>:0 
  at System.Threading.Tasks.TaskReplicator+Replica.Execute () [0x00023] in <c453bf849bb84e719dbec0475e99db95>:0 <---

Additionally, please find below an example of command line flags passed to Morpheus.

 mono morpheus.exe -d raw_to.mzML -db 18mix092106.fasta -p=trypsin -minprecz=2 -maxprecz=4 -at=-1.0 -rt=-1.0 -mp=400 -acs=true -di=true -noup= -ad=false -mmc=2 -imb=variable -mvmi=1024 -precmtv=2.1 -precmtu=Da -precmt=monoisotopic -pmc=false -minpmo=-3 -maxpmo=1 -prodmtv=0.015 -prodmtu=Da -prodmt=monoisotopic -fdr=1.0 -cmu=false -p=trypsin  -o ../data/

Please let me know if there is anything I can provide to assist in figuring out this issue, and thanks in advance for your time.

Sincerely,

Mathew Gutierrez

@cwenger
Copy link
Owner

cwenger commented Jul 30, 2020

Hi Mat,

Thanks for your extensive bug report!

This error was due to the activation energy being listed before the activation type in the mzML, e.g.:

              <activation>
                <cvParam cvRef="MS" accession="MS:1000045" name="collision energy" value="35.0" unitCvRef="UO" unitAccession="UO:0000266" unitName="electronvolt"/>
                <cvParam cvRef="MS" accession="MS:1000133" name="collision-induced dissociation" value=""/>
              </activation>

instead of what I had always seen before:

              <activation>
                <cvParam cvRef="MS" accession="MS:1000133" name="collision-induced dissociation" value=""/>
                <cvParam cvRef="MS" accession="MS:1000045" name="collision energy" value="35.0" unitCvRef="UO" unitAccession="UO:0000266" unitName="electronvolt"/>
              </activation>

I just pushed a fix for this. Do you build from source or do you need an updated release?

-Craig

@gutierrezm00
Copy link
Author

an updated release would be most helpful for me!

(Very impressive response time by the way)

@cwenger
Copy link
Owner

cwenger commented Jul 30, 2020

I haven't done a release in many years but I'll see if I can refresh my memory!

@cwenger
Copy link
Owner

cwenger commented Jul 30, 2020

New release is up.

@gutierrezm00
Copy link
Author

Awesome! Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants