Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHANGE] ui option name for feature file boundaries #99

Merged
merged 4 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions massdash/server/ExtractedIonChromatogramAnalysisServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ def main(self):
st.write(f"Loading XIC data... Elapsed time: {elapsed_time()}")

# Perform peak picking based on user settings
if peak_picking_settings.do_peak_picking == 'OSW-PyProphet':
if peak_picking_settings.do_peak_picking == 'Feature File Boundaries':
with time_block() as elapsed_time:
tr_group_feature_data = self.xic_data.loadTransitionGroupFeatures(transition_list_ui.transition_settings.selected_peptide, transition_list_ui.transition_settings.selected_charge)
st.write(f"Loading OSW-PyProphet Peak Boundaries... Elapsed time: {elapsed_time()}")
st.write(f"Loading Feature File Peak Boundaries... Elapsed time: {elapsed_time()}")
elif peak_picking_settings.do_peak_picking == 'pyPeakPickerMRM':
with time_block() as elapsed_time:
# Peak picking using pyMRMTransitionGroupPicker
Expand Down
6 changes: 3 additions & 3 deletions massdash/server/PeakPickingServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, peak_picking_settings: PeakPickingUISettings, chrom_plot_sett

def perform_osw_pyprophet_peak_picking(self, xic_data: SqMassLoader, transition_list_ui: Literal['ExtractedIonChromatogramAnalysisUI', 'RawTargetedExtractionAnalysisUI']):
singjc marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am having difficulties with this method in the GUI could you please look into this? I think that the loader object for the raw data is not currently being passed which causes loadTransitionGroupFeature to fail. Not sure what the best way to solve this without just adding more arguments

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're getting this error?

AttributeError: 'NoneType' object has no attribute 'loadTransitionGroupFeature'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes thats the error. I think it is because there is no XIC data/loader object passed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I passed the mzml loader object now instead to get the feature data from the results file. I think I initially used the sqMass workflow that's why it failed.

"""
Performs peak picking using OSW-PyProphet algorithm.
Get peak boundaries from Feature File Boundaries.

Args:
xic_data (object): The XIC data.
Expand All @@ -49,7 +49,7 @@ def perform_osw_pyprophet_peak_picking(self, xic_data: SqMassLoader, transition_
transition_list_ui.transition_settings.selected_peptide,
transition_list_ui.transition_settings.selected_charge
)
st.write(f"Loading OSW-PyProphet Peak Boundaries... Elapsed time: {elapsed_time()}")
st.write(f"Loading Feature File Peak Boundaries... Elapsed time: {elapsed_time()}")
return tr_group_feature_data

def perform_pypeakpicker_mrm_peak_picking(self, tr_group_data: TransitionGroup):
Expand Down Expand Up @@ -118,7 +118,7 @@ def perform_peak_picking(self, tr_group_data: TransitionGroup=None, xic_data: Sq
tr_group_feature_data = {}

# Perform peak picking based on the selected method
if self.peak_picking_settings.do_peak_picking == 'OSW-PyProphet':
if self.peak_picking_settings.do_peak_picking == 'Feature File Boundaries':
tr_group_feature_data = self.perform_osw_pyprophet_peak_picking(xic_data, transition_list_ui)
elif self.peak_picking_settings.do_peak_picking == 'pyPeakPickerMRM':
tr_group_feature_data = self.perform_pypeakpicker_mrm_peak_picking(tr_group_data)
Expand Down
4 changes: 2 additions & 2 deletions massdash/ui/PeakPickingUISettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def create_ui(self, plot_settings: ChromatogramPlotUISettings):
st.sidebar.title("Peak Picking")

## Perform Peak Picking
self.do_peak_picking = st.sidebar.selectbox("Peak Picking", ['none', 'OSW-PyProphet', 'pyPeakPickerMRM', 'MRMTransitionGroupPicker', 'Conformer'], help="Peak picking method to use.")
self.do_peak_picking = st.sidebar.selectbox("Peak Picking", ['none', 'Feature File Boundaries', 'pyPeakPickerMRM', 'MRMTransitionGroupPicker', 'Conformer'], help="Peak picking method to use.")

if self.do_peak_picking != 'none':
## Perform peak picking on displayed chromatogram, or adjust smoothing separately for peak picking?
Expand All @@ -54,7 +54,7 @@ def create_ui(self, plot_settings: ChromatogramPlotUISettings):
if self.do_peak_picking == "pyPeakPickerMRM":
self.peak_picker_algo_settings = pyPeakPickerMRMUISettings(self)
self.peak_picker_algo_settings.create_ui(plot_settings)
elif self.do_peak_picking == "OSW-PyProphet":
elif self.do_peak_picking == "Feature File Boundaries":
pass
elif self.do_peak_picking == "MRMTransitionGroupPicker":
self.peak_picker_algo_settings = MRMTransitionGroupPickerUISettings(self)
Expand Down
Loading