diff --git a/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.cpp b/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.cpp index 660b63d0d7208184e64b47d6f1d853441e51230e..eeb9e88bb67915257c224b944579b207207f1127 100644 --- a/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.cpp +++ b/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.cpp @@ -51,6 +51,7 @@ McqrSdsXicWidget::McqrSdsXicWidget(McqrRunView *mcqr_window, disableFutureStepsInToolBox(); addFactorsToListViews(); initGrantleeEngine(); + m_mcqrLoadDataMode = p_mcqr_experiment.get()->getMcqrLoadDataMode(); } McqrSdsXicWidget::~McqrSdsXicWidget() @@ -221,7 +222,7 @@ McqrSdsXicWidget::initGrantleeEngine() else { throw pappso::PappsoException( - QObject::tr("currently, only fraction experiment can be run inside " + QObject::tr("currently, only fraction experiment can be run inside " "X!TandemPipeline")); } } @@ -236,7 +237,14 @@ McqrSdsXicWidget::changeStepAfterEndTag(QString end_name) } else if(end_name == "MCQREnd: filtering_data") { - configureReconstitutingTab(); + if(m_mcqrLoadDataMode == McqrLoadDataMode::basic) + { + configureNormaliseTab(); + } + else + { + configureReconstitutingTab(); + } } else if(end_name == "MCQREnd: reconstiting_fraction") { diff --git a/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.h b/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.h index c71688df5dadbeab2508cdbe93db12846ea78a5b..336430426538920365a23548a01f974fde86a18b 100644 --- a/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.h +++ b/src/gui/mcqr_run_view/mcqr_sds_xic_widget/mcqrsdsxicwidget.h @@ -102,4 +102,5 @@ class McqrSdsXicWidget : public McqrParamWidget QStandardItemModel *mp_factorsLabelModel = nullptr; QStandardItemModel *mp_factorsListModel = nullptr; QStandardItemModel *mp_factorLevelsToRemove = nullptr; + McqrLoadDataMode m_mcqrLoadDataMode; }; diff --git a/src/resources/templates/mcqr_scripts/mcqr_basic_xic_analysis.R b/src/resources/templates/mcqr_scripts/mcqr_basic_xic_analysis.R index 514f6f79887b2084ca0c937819d2d6e0d4955667..8205640da0dfcd11bd42dcac903d5f6602487855 100644 --- a/src/resources/templates/mcqr_scripts/mcqr_basic_xic_analysis.R +++ b/src/resources/templates/mcqr_scripts/mcqr_basic_xic_analysis.R @@ -120,56 +120,18 @@ ############# If necessary, removing dubious chromatographic data # Removing peptides-mz showing too much variations of their retention time. These peptides-mz may occur from mis-identifications. Use the plot produced by the mcq.plot.rt.variability function to decide on the cut-off of standard deviation to use (e.g. here, 20 seconds). - capture.output(XIC <- mcq.drop.variable.rt(XIC_clean, cutoff={{ cutoff_rt }}, file=stderr()) + capture.output(XIC <- mcq.drop.variable.rt(XIC_clean, cutoff={{ cutoff_rt }}), file=stderr()) # Removing peptides-mz associated to very large chromatographic peaks. Use the plot produced by the mcq.plot.peak.width function to decide on the cut-off to use (e.g. here, 200 seconds). Don't be too stringent with this filter because the peak width is proportional to the peak height. A large peak may therefore simply correspond to a peptide-mz that is particularly intense in a given injection. - capture.output(XIC <- mcq.drop.wide.peaks(XIC, cutoff={{ cutoff_peaks }}, file=stderr()) + capture.output(XIC <- mcq.drop.wide.peaks(XIC, cutoff={{ cutoff_peaks }}), file=stderr()) ############# Display of a summary of the 'XIC' object after removal of dubious peptides cat("<h3>XIC summary after filtering</h3>") - summary(XIC.SDS) + summary(XIC) message("MCQREnd: filtering_data") {% elif mcqr_step == 2%} message("MCQRBegin: reconstiting_fraction") - #**************************************************************************************************************** - # 3.3.2. Reconstituting samples from fractions - #**************************************************************************************************************** - cat("<h3>Reconstituting samples from fractions</h3>") - cat("<h4>XIC summary after track reconstituted</h4>") - ############# Computing peptide intensities by track as the sum of the peptide intensities of all fractions for each track - XIC.BY.TRACK <- mcq.compute.quantity.by.track(XIC.SDS) - summary(XIC.BY.TRACK) - - ############# Checking intensity profiles for the peptide_mz belonging to the same protein - ### pas posible pour l'instant - # Display of the graph on the screen for 10 proteins -# mcq.plot.peptide.intensity(XIC.BY.TRACK, flist=c({{ factor_list }}), rCutoff = {{ r_cutoff }}, showImputed = {{ show_imputed }}, nprot= {{ n_prot }}, log= {{ log }}, scale = {{ scale }}) - - ############# Checking the distribution of the peptide intensities in the reconstituted samples (tracks). Are there samples showing odd distribution? - cat("<h4>Peptide intensities distribution in the reconstituted samples</h4>") - # Display of the graph on the screen - svglite("{{ tmp_path }}/intensity_violin.svg", width=14, height=12) - mcq.plot.intensity.violin(XIC.BY.TRACK, factorToColor=c({{ factor_color }})) - capture.output(dev.off(), file=stderr()) - cat("<p><img src=\"{{ tmp_path }}/intensity_violin.svg\" /></p>") - - - ############# Checking the global correlation between the peptide-mz intensities of one sample and the peptide-mz intensities of a sample chosen as reference. Are the correlation globally correct? - cat("<h4>Plot global correlation between all tracks vs {{ track_level }}</h4>") - # Display of the graph on the screen - svglite("{{ tmp_path }}/intensity_correlation_%01d.svg", width=14, height=12) - capture.output(mcq.plot.intensity.correlation(XIC.BY.TRACK, ref="{{ track_level }}"), file=stderr()) - capture.output(dev.off(), file=stderr()) - - nb_tracks = length(XIC.BY.TRACK@metadata@metadata[["track"]]) - 1 - nb_pages = nb_tracks%/%4 - if(nb_tracks%%4 != 0) { - nb_pages = nb_pages + 1 - } - for(i in 1:nb_pages){ - cat(paste0("<p><img src=\"{{ tmp_path }}/intensity_correlation_", i, ".svg\" /></p>")) - } message("MCQREnd: reconstiting_fraction") {% elif mcqr_step == 3 %} @@ -181,7 +143,7 @@ cat("<h3>Normalizing peptide-mz intensities</h3>") ############# Normalizing peptide-mz intensities # Normalization by a median-based method ("median" or "median.RT", based on a reference sample) or by a "percent" method. See help for details - capture.output(XIC <- mcq.compute.normalization(XIC.BY.TRACK, ref="{{ track_ref }}", method="{{ norm_method }}"), file=stderr()) + capture.output(XIC <- mcq.compute.normalization(XIC, ref="{{ track_ref }}", method="{{ norm_method }}"), file=stderr()) cat("<h4>Control the normalization effets</h4>") ############# Controling the effect of normalization on intensities distribution