MannLabs / alphabase

Infrastructure of AlphaX ecosystem
https://alphabase.readthedocs.io
Apache License 2.0
31 stars 9 forks source link

Reannotate precursors with fragments from different speclib #55

Closed GeorgWa closed 1 year ago

GeorgWa commented 1 year ago

When re-extracting psms it can be necessary to annotate precursors with an existing spectral library. The mod_seq_hash column is used to left-joint fragments and non-matched precursors are removed. The whole fragment_intensity_df and fragment_mz_df are copied.

SpecLibBase.annotate_fragments_from_speclib(SpecLibBase)

remove_unused_fragments can be used after annotation or generally to remove fragments which are not used in the precursor_df. The operation happens in place and fragment start and end indices are recalculated.

SpecLibBase.remove_unused_fragments()

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

jalew188 commented 1 year ago

@GeorgWa Could you update the code in sphinx_doc branch? Otherwise there are quite many conflicts because I removed all #| export cells in nbdev_nbs

GeorgWa commented 1 year ago

@GeorgWa Could you update the code in sphinx_doc branch? Otherwise there are quite many conflicts because I removed all #| export cells in nbdev_nbs

Sure, will do 👍🏻