cwenger / morpheus Goto Github PK
View Code? Open in Web Editor NEWMorpheus mass spectrometry–based proteomics database search algorithm
Home Page: http://cwenger.github.io/Morpheus/
License: MIT License
Morpheus mass spectrometry–based proteomics database search algorithm
Home Page: http://cwenger.github.io/Morpheus/
License: MIT License
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.
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
Hi,
I am trying to understand your implementation of the FDR cutoff / q-value calculation. When attempting to calculate the cutoff myself, I end up with higher thresholds.
I see that Morpheus cuts based on the q-value. Naively, I would have assumed that q_value = FDR, with FDR = N_decoy / N_total = N_decoy / (N_decoy+N_target). However, when I plot the q-values from vs this definition from the tsv output sheet I see that that the values differ:
For my specific example I get the following results from the Morpheus log (FDR = 0.01):
14,276 target (142 decoy) PSMs at 0.994% PSM FDR (12.062 Morpheus score threshold)
From the table I can see where the cut is made:
Here, the FDR is calculated as 142/(14276+142) = 0.0098488 which is different than the q-value. However, even for the last value, the FDR would be 143/(14279+143) = 0.0099154 and therefore < 0.01, giving you a couple more hits.
Is the definition of the q-value another or is this a bug? Any help on this would be appreciated. Thank you so much.
Morpheus/Morpheus/Protein.cs
public string Accession
{
get { return Description.Substring(0, Description.IndexOf(' ')); }
}
Causes an exception if a fasta ID line doesn't contain a space character. Finding accessions is difficult due to the wide range of formatting in use. Compomics attempts to pattern all common formats in order to find the Accession: https://github.com/compomics/compomics-utilities/blob/master/src/main/java/com/compomics/util/protein/Header.java
At the minimum, it might be good to return the entire Description as the accession if a space character is not found.
Is it possible to add a detailed documentation.
Hi ,
I'm trying to use Morpheus in Windows as a Command Line tool using the "morpheus_tmo_cl.exe" . Can you please let me know what are the parameters I'm supposed to feed in the command prompt.
Thanks
I want to package this project into Conda, Galaxy and Docker, we need to have a License to redistribute this software.
Thanks!
I was trying to use ProteoWizard idconvert to convert the Morpheus mzid output to pep.xml for pyQuant.
idconvert expects an EnzymeName tag with a cvParam.
The Morpheus maid has:
% idconvert -o outdir2 --pepXML morpheus.mzid
format: pepXML
outputPath: outdir2
extension: .pepXML
filenames:
morpheus.mzid
processing file: morpheus.mzid
writing output file: outdir2/morpheus.pepXML
Error writing analysis 1 in "morpheus.mzid":
[pepXMLSpecificity] No case supporting enzyme "CVID_Unknown"
idconvert succeeds if I edit morpheus.mzid to add the EnzymeName tag:
I'm trying to run Morpheus on a 32 Bit Windows 7 SP1 and get the following errors. Is it a 32 Bit issue? Can Morpheus be run on a Win32 system?
Thanks
Initializing...
Starting C:\MorpheusPostAcquisitionSearch\UF_Top15_QEPlus_Test.RAW...
Extracting and preprocessing MS/MS spectra...
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {1D23188D-53FE-4C25-B032-DC70ACDBDC02} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Morpheus.TandemMassSpectra.Load(String rawFilepath, Int32 minimumAssumedPrecursorChargeState, Int32 maximumAssumedPrecursorChargeState, Double absoluteThreshold, Double relativeThresholdPercent, Int32 maximumNumberOfPeaks, Boolean assignChargeStates, Int32 maximumThreads)
at Morpheus.TandemMassSpectra.Load(String rawFilepath, Int32 minimumAssumedPrecursorChargeState, Int32 maximumAssumedPrecursorChargeState, Double absoluteThreshold, Double relativeThresholdPercent, Int32 maximumNumberOfPeaks, Boolean assignChargeStates, Boolean deisotope, MassTolerance isotopicMZTolerance, Int32 maximumThreads)
at Morpheus.DatabaseSearcher.DoSearch()
Finished!
if you have any interest in seeing the minor tweaks we made to it over the years, stop by
https://github.com/smith-chem-wisc/MetaMorpheus
i hope you are doing well. luv to hear what you are up to.
-michael
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.