diff --git a/src/gui/mcqr_run_view/mcqrrunview.cpp b/src/gui/mcqr_run_view/mcqrrunview.cpp index 187d584981e8a32c0b95df3f6ee601a93e0ef2e2..f2cf0e03adfc5e68ce13c89b3eec5722b90a8013 100644 --- a/src/gui/mcqr_run_view/mcqrrunview.cpp +++ b/src/gui/mcqr_run_view/mcqrrunview.cpp @@ -264,7 +264,7 @@ McqrRunView::handleMcqrErrors(QString error_message) emit saveRscriptAndRdata(); break; case QMessageBox::Close: - emit closeMcqrRunView(); + //emit closeMcqrRunView(); break; } } 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 f01a795f613a1e5c26f0af408ee0bf097a296987..cbb2da8c31bb572ef9e95a13434a8d5c20014238 100644 --- a/src/resources/templates/mcqr_scripts/mcqr_basic_xic_analysis.R +++ b/src/resources/templates/mcqr_scripts/mcqr_basic_xic_analysis.R @@ -206,19 +206,20 @@ ############# Checking of the correlation of the peptides-mz belonging to a same protein # Display of the graph on the screen - cat("<h4>Plot the peptide intensity to choose correlation cutoff</h4>") - svglite("{{ tmp_path }}/peptide_intensity_corr.svg", width=14, height=12) - capture.output(PROTS <- mcq.plot.peptide.intensity(XIC, flist=c({{ factors_list }}), rCutoff = {{ corr_cutoff }}, nprot={{ n_prot_corr }}, getProtlist=TRUE, showImputed={{ filter_imputed }}, log = {{ filter_log }}), file=stderr()) - capture.output(dev.off(), file=stderr()) - cat("<p><img src=\"{{ tmp_path }}/peptide_intensity_corr.svg\" /></p>") + #cat("<h4>Plot the peptide intensity to choose correlation cutoff</h4>") + #svglite("{{ tmp_path }}/peptide_intensity_corr.svg", width=14, height=12) + #capture.output(PROTS <- mcq.plot.peptide.intensity(XIC, flist=c({{ factors_list }}), rCutoff = {{ corr_cutoff }}, nprot={{ n_prot_corr }}, getProtlist=TRUE, showImputed={{ filter_imputed }}, log = {{ filter_log }}), file=stderr()) + #capture.output(dev.off(), file=stderr()) + #cat("<p><img src=\"{{ tmp_path }}/peptide_intensity_corr.svg\" /></p>") message("MCQREnd: filtering_shared") {% elif mcqr_step == 5 %} message("MCQRBegin: filtering_uncorrelated") ############# Removing the peptides-mz whose intensity profile deviates from the average profile of the peptides-mz from the same protein. This filter must be applied only if the number of levels within one of the factors of interest (factors like replicates not included) is superior or equal to 5 because it is based on the correlation between peptides-mz belonging to the same protein. - capture.output(XIC <- mcq.drop.uncorrelated.peptides(XIC, flist=c({{ factors_list }}), rCutoff = {{ cor_cutoff }}), file=stderr()) + #capture.output(XIC <- mcq.drop.uncorrelated.peptides(XIC, flist=c({{ factors_list }}), rCutoff = {{ cor_cutoff }}), file=stderr()) + capture.output(XIC <- mcq.drop.shared.peptides(XIC), file=stderr()) ############# Removing proteins quantified by a small number of peptides-mz. When the minimal number of peptides-mz required is 2, this filter is automatically included in the mcq.drop.uncorrelated.peptides function. The function mcq.drop.proteins.with.few.peptides is therefore unnecessary. capture.output(XIC <- mcq.drop.proteins.with.few.peptides(XIC, npep = {{ nb_pep }}), file=stderr()) @@ -237,7 +238,7 @@ #**************************************************************************************************************** # Imputing missing peptide-mz intensities. No imputation is made for peptide-mz intensity when a protein is completely absent from a sample. - capture.output(XIC <- mcq.compute.peptide.imputation(XIC, method="{{ imputation_method }}"), file=stderr()) + #capture.output(XIC <- mcq.compute.peptide.imputation(XIC, method="{{ imputation_method }}"), file=stderr()) # Display of a summary of the 'XIC' object after peptides imputation cat("<h4>XIC summary after imputing missing peptide intensities</h4>") @@ -254,6 +255,9 @@ # Display of a summary of the 'XICAB' object cat("<h4>XIC summary after computing protein abundance</h4>") summary(XICAB) + + cat("<h4>writing protein abundance compar file XIC_raw_compar.tsv</h4>") + mcq.write.compar(XICAB, file="XICAB_raw_compar.tsv") #**************************************************************************************************************** # 3.3.7. Imputing missing protein abundances @@ -265,6 +269,9 @@ # Display of a summary of the 'XICAB' object after proteins imputation cat("<h4>XIC summary after imputing protein abundance</h4>") summary(XICAB) + + cat("<h4>writing protein abundance compar file (with imputation) XIC_compar.tsv</h4>") + mcq.write.compar(XICAB, file="XIC_compar.tsv") #**************************************************************************************************************** # 3.3.8. Overview of the protein abundance data @@ -274,15 +281,15 @@ ############# PCA representation cat("<h3>Principal Component Analysis</h3>") # PCA using a factor or a combination of factors as individuals (in this case, average abundances are computed for the factor or for the combination of factors) - capture.output(XICAB_PCA <- mcq.compute.pca(XICAB, flist=c({{ factors_list }})), file=stderr()) + #capture.output(XICAB_PCA <- mcq.compute.pca(XICAB, flist=c({{ factors_list }})), file=stderr()) # Display of the PCA on the screen. Possibility to modify the 'factorToColor' and 'labels' arguments to change the colors and the labels of the individuals represented on the PCA. - svglite("{{ tmp_path }}/xic_ab_pca_%01d.svg", width=14, height=12) - capture.output(mcq.plot.pca(XICAB_PCA, factorToColor=c({{ factors_color }}), labels = c({{ factors_label }}), tagType="both", labelSize=4), file=stderr()) - capture.output(dev.off(), file=stderr()) - cat("<p><img src=\"{{ tmp_path }}/xic_ab_pca_1.svg\" /></p>") - cat("<p><img src=\"{{ tmp_path }}/xic_ab_pca_2.svg\" /></p>") - cat("<p><img src=\"{{ tmp_path }}/xic_ab_pca_3.svg\" /></p>") + #svglite("{{ tmp_path }}/xic_ab_pca_%01d.svg", width=14, height=12) + #capture.output(mcq.plot.pca(XICAB_PCA, factorToColor=c({{ factors_color }}), labels = c({{ factors_label }}), tagType="both", labelSize=4), file=stderr()) + #capture.output(dev.off(), file=stderr()) + #cat("<p><img src=\"{{ tmp_path }}/xic_ab_pca_1.svg\" /></p>") + #cat("<p><img src=\"{{ tmp_path }}/xic_ab_pca_2.svg\" /></p>") + #cat("<p><img src=\"{{ tmp_path }}/xic_ab_pca_3.svg\" /></p>") message("MCQREnd: imputing")