Roestlab / massdash

MassDash: A web-based dashboard for streamlined DIA-MS visualization, analysis, prototyping, and optimization
https://massdash.streamlit.app/
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

SqMassLoader not laoding transitionChroms? #37

Closed singjc closed 8 months ago

singjc commented 8 months ago

I'm running into this issue when I call the loadTransitionGroups method from a SqMassLoader object, it only seems to return precursorChrom data and not transitionChrom data. I'm using the test data, so there should be transition data.

I call the sqMassLoader like this:

self.xic_data = SqMassLoader(self.massseer_gui.file_input_settings.sqmass_file_path_list, self.massseer_gui.file_input_settings.osw_file_path)

tr_group_data = self.xic_data.loadTransitionGroups(transition_list_ui.transition_settings.selected_peptide, transition_list_ui.transition_settings.selected_charge)

The Selected peptide: ANS(UniMod:21)SPTTNIDHLK(UniMod:259) and Selected charge: 2

Specifically in the method call for when if gets transitions

transition_chroms = t.getDataForChromatograms(metaInfo['TRANSITION_ID'], metaInfo['PRODUCT_ANNOTATION'])

It seems like metaInfo['TRANSITION_ID'] evaluates to pd,.DataSeries, similar with metaInfo['PRODUCT_ANNOTATION']

metaInfo['TRANSITION_ID']
0         174
1         175
2         176
3         177
4         178
        ...  
384    700416
385    700417
386    700418
387    700419
388    700420
Name: TRANSITION_ID, Length: 389, dtype: int64
metaInfo['PRODUCT_ANNOTATION']
0      y9^1
1      y3^1
2      y7^1
3      y8^1
4      y4^1
       ... 
384    y9^2
385    y9^1
386    y9^1
387    y9^2
388    y9^2
Name: PRODUCT_ANNOTATION, Length: 389, dtype: object

Checking for the length of precursorChrom and transitionChrom in the TransitionGroup object

Length of transition chromatograms: 0
Length of precursor chromatograms: 1
jcharkow commented 8 months ago

Yes I ran into this issue too. My initial tests were not good enough! Please see https://github.com/Roestlab/massseer/pull/32 for the fix. I also grouped in pandas output to that PR