elixir-proteomics-community / sdrf_convert

3 stars 0 forks source link

added pyteomics and unimod query #2

Closed julianu closed 1 year ago

julianu commented 1 year ago

Added a simple function, which uses pyteomics to query Unimod for a given Modification. You can simply call in your converter something like: converter.get_unimod_from_NT("Oxidation")

Or to list all monoisotopic mass shifts of the modifications:

for col_name in converter.find_columns(converter.sdrf_df, 'comment[modification parameters]*'):
    modification_dict = converter.ontology_str_to_dict(sample[col_name])
    mod = converter.get_unimod_from_NT(modification_dict['NT'])
    print(modification_dict, mod['mono_mass'])
julianu commented 1 year ago

Actually, only the environment and abstract class should be in this PR. Anyone knows, how to change this?

di-hardt commented 1 year ago

Go back in your branch to the commit you wanted to submit. Create a new branch from that point and create a new PR using the new branch.