Falcon debug#46
Open
XianghuWang-287 wants to merge 4 commits into
Open
Conversation
Falcon's CSV doesn't carry per-spectrum precursor intensity, so convert_falcon_to_mscluster_format.py was hardcoding #PrecIntensity to 0 for every row. That zeroed out sum(precursor intensity) in clustersummary.tsv and turned every cell of featuretable_reformatted_precursorintensity.csv into 0.0 when the clustering tool was falcon. mscluster's binary writes #PrecIntensity itself from the input mzML, so the precursor-intensity feature table worked there. Look up the value from the original input mzML/mzXML the same way mscluster does, using ming_spectrum_library, and fall back to 0 only when the file or scan isn't available.
ming_spectrum_library.load_mzml_file unconditionally does float(activation["collision energy"]) and raises KeyError on any MS2 spectrum that lacks the "collision energy" CV term. That blew up parsing of an entire mzML in the lookup helper (verified against benchmark_featurefinding/MSV000080555/C7_RC7_01_8270.mzML) and silently fell back to 0 intensity for the whole file -- reintroducing the bug this change is supposed to fix. Read the mzML / mzXML directly with pyteomics in the helper and pull only the field we need (precursor "peak intensity" CV term for mzML, @precursorIntensity for mzXML). Verified on three benchmark files (C6_GC6_01_2916, C7_RC7_01_8270, WE_Bio_T1; 5357 MS2 spectra total) the lookup matches an independent pyteomics read exactly, including nonzero values such as 439017.71875.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.