Skip to content

croningp/RecursiveMA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recursive MS2MA

Installation

# clone the repo then
pip install -e recursive_ma

Usage

First convert your MSn data to the tree format:

{ms1_mz1: {ms2_mz1: {ms3_mz1: {}, ms3_mz2: {}}, ms2_mz2: {ms3_mz3: {}}}, ...}

There is a utility function to convert data of the form {ms_level: pd.DataFrame} to the tree format:

from recursive_ma import build_tree
tree = build_tree(data, max_level=<n>)

Note that this function assume that each dataframe has the columns mz and intensity, as well as parent for MS2 and higher.

Then you can run the recursive MS2MA algorithm:

from recursive_ma import estimate_MA
# parent_mz is the m/z of the parent (MS1) ion
estimate_MA(tree, parent_mz)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages