Repository 'mqppep_anova'
hg clone https://eddie.galaxyproject.org/repos/eschen42/mqppep_anova

Changeset 7:d728198f1ba5 (2022-03-15)
Previous changeset 6:922d309640db (2022-03-11) Next changeset 8:2cdb2280771c (2022-03-15)
Commit message:
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/mqppep commit 9a0fa6d0f9aadc069a5551a54da6daf307885637"
modified:
MaxQuantProcessingScript.R
PhosphoPeptide_Upstream_Kinase_Mapping.pl
macros.xml
mqppep_anova.R
mqppep_anova.xml
mqppep_anova_script.Rmd
repository_dependencies.xml
workflow/ppenrich_suite_wf.ga
b
diff -r 922d309640db -r d728198f1ba5 MaxQuantProcessingScript.R
--- a/MaxQuantProcessingScript.R Fri Mar 11 20:04:05 2022 +0000
+++ b/MaxQuantProcessingScript.R Tue Mar 15 00:35:16 2022 +0000
[
@@ -695,7 +695,6 @@
 
 # Write phosphopeptides filtered by enrichment
 # --
-#ACE colnames(quant_data_qc_enrichment)[1] <- "Phosphopeptide"
 write.table(
   quant_data_qc_enrichment,
   file = output_filename,
b
diff -r 922d309640db -r d728198f1ba5 PhosphoPeptide_Upstream_Kinase_Mapping.pl
--- a/PhosphoPeptide_Upstream_Kinase_Mapping.pl Fri Mar 11 20:04:05 2022 +0000
+++ b/PhosphoPeptide_Upstream_Kinase_Mapping.pl Tue Mar 15 00:35:16 2022 +0000
[
b'@@ -25,7 +25,6 @@\n ###############################################################################################################################\r\n \r\n use strict;\r\n-#ACE use warnings;\r\n use warnings \'FATAL\' => \'all\';\r\n \r\n use Getopt::Std;\r\n@@ -67,7 +66,6 @@\n my (@kinases_PhosphoSite, $kinases_PhosphoSite);\r\n my ($p_sequence_kinase_PhosphoSite, $p_sequence_PhosphoSite, $kinase_PhosphoSite);\r\n my (%regulatory_sites_PhosphoSite_hash);\r\n-#ACE my %psp_regsite_protein;\r\n my (%domain, %ON_FUNCTION, %ON_PROCESS, %ON_PROT_INTERACT, %ON_OTHER_INTERACT, %notes, %organism);\r\n my (%unique_motifs);\r\n my ($kinase_substrate_NetworKIN_matches, $kinase_motif_matches, $kinase_substrate_PhosphoSite_matches);\r\n@@ -196,8 +194,6 @@\n \r\n getopts(\'i:f:s:n:m:p:r:P:F:o:O:D:hva\', \\%opts) ;\r\n \r\n-#ACE print %opts; #ACE\r\n-#ACE print "\\n"; #ACE\r\n \r\n if (exists($opts{\'h\'})) {\r\n     usage();\r\n@@ -221,15 +217,6 @@\n     $fasta_in = $opts{\'f\'};\r\n     $use_sqlite = 0;\r\n }\r\n-#ACE  if (exists($opts{\'s\'}) && -e $opts{\'s\'}) {\r\n-#ACE      $use_sqlite = 1;\r\n-#ACE      $dbfile = $opts{\'s\'};\r\n-#ACE  } elsif (!exists($opts{\'f\'}) || !-e $opts{\'f\'}) {\r\n-#ACE      die(\'Neither input FASTA file nor input SQLite file was found\');\r\n-#ACE  } else {\r\n-#ACE      $use_sqlite = 0;\r\n-#ACE      $fasta_in = $opts{\'f\'};\r\n-#ACE  }\r\n my $species;\r\n if ((!exists($opts{\'s\'})) || ($opts{\'s\'} eq \'\')) {\r\n     $species = \'human\';\r\n@@ -426,8 +413,6 @@\n       push (@databases, $x[0]);\r\n       push (@accessions, $x[1]);\r\n       push (@names, $x[2]);\r\n-      #ACE print "names $x[2]\\n";\r\n-      #ACE print "--- $_\\n";\r\n       pseudo_sed();\r\n       s/$/\\t/;\r\n       push (@parsed_fasta, $_);\r\n@@ -439,7 +424,6 @@\n       }\r\n       $parsed_fasta[$#accessions] = $parsed_fasta[$#accessions].$x[0];\r\n     }\r\n-    #ACE print "... \'$parsed_fasta[$#accessions]\'\\n";\r\n   }\r\n   close IN1;\r\n   print "Done Reading FASTA file $fasta_in\\n";\r\n@@ -614,7 +598,6 @@\n   $i = system("\\$CONDA_PREFIX/bin/python $dirname/search_ppep.py -u $db_out -p $file_in --verbose");\r\n } else {\r\n   $i = system("\\$CONDA_PREFIX/bin/python $dirname/search_ppep.py -u $db_out -p $file_in");\r\n-  #ACE DELETEME $i = system("\\$CONDA_PREFIX/bin/python $dirname/search_ppep.py -u $db_out -p $file_in --verbose");\r\n }\r\n if ($i) {\r\n   print "python $dirname/search_ppep.py -u $db_out -p $file_in\\n  exited with exit code $i\\n";\r\n@@ -634,7 +617,6 @@\n #\r\n ###############################################################################################################################\r\n \r\n-#ACE print OUT "$headers\\tFormatted Motifs\\tUnique Motifs\\tPhospho-site(s)\\tAccessions(s)\\tName(s)\\n";\r\n \r\n print "--- Match the non_p_peptides to the \\@sequences array:\\n";\r\n \r\n@@ -750,7 +732,6 @@\n     }\r\n \r\n     # Prepare counter and phosphopeptide tracker for next row\r\n-    #ACE print "counter: $counter; phosphpepetide: $current_ppep\\n";\r\n     $former_ppep = $current_ppep;\r\n     $counter -= 1;\r\n \r\n@@ -822,15 +803,11 @@\n     my @matches = @{$matched_sequences{$peptide_to_match}};\r\n     @tmp_motifs_array = ();\r\n     for my $i (0 .. $#matches) {\r\n-        #ACE print "Matching $peptide_to_match to match $i\\n";\r\n-        #ACE print "\\$sites{\\$peptide_to_match}[\\$i] $sites{$peptide_to_match}[$i]\\n";\r\n \r\n         # Find the location of the phospo-site in the sequence(s)\r\n         $tmp_site = 0; my $offset = 0;\r\n         my $tmp_p_peptide = $peptide_to_match;\r\n-        #ACE print "peptide_to_match: $peptide_to_match at position $sites{$peptide_to_match}[$i] in sequence $matched_sequences{$peptide_to_match}[$i]\\n";\r\n         $tmp_p_peptide =~ s/#//g; $tmp_p_peptide =~ s/\\d//g; $tmp_p_peptide =~ s/\\_//g; $tmp_p_peptide =~ s/\\.//g;\r\n-        #ACE print "tmp_p_peptide: $tmp_p_peptide\\n";\r\n \r\n         # Find all phosphorylated residues in the p_peptide\r\n         @p_sites = ();\r\n@@ -870,9 +847,7 @@\n             my $arg1 = $matched_sequences{$peptide_to_match}[$i];\r\n \r\n             if (($total_length > 0) && (length($arg1) > $arg2 + $total_length - 1)) {\r\n-                #ACE print "\\$tmp_'..b'-                    #ACE }\r\n-                    #ACE elsif ($psp_regsite_protein{$seq_plus7aa} eq "") {\r\n-                    #ACE     # do nothing\r\n-                    #ACE }\r\n-                    #ACE else {\r\n-                    #ACE     $psp_regsite_protein_2{$peptide} = $psp_regsite_protein_2{$peptide}." / ".$psp_regsite_protein{$seq_plus7aa};\r\n-                    #ACE }\r\n \r\n                     # $ON_FUNCTION_2\r\n                     if ($ON_FUNCTION_2{$peptide} eq "") {\r\n@@ -1682,7 +1610,6 @@\n                     }\r\n                     $organism_2{$peptide} = $organism{$seq_plus7aa};\r\n                 } else {\r\n-                    #ACE print "d not found \\$regulatory_sites_PhosphoSite_hash{{$seq_plus7aa}}\\n";\r\n                 } # if (exists($regulatory_sites_PhosphoSite -> {$seq_plus7aa}))\r\n             } # for my $k (0 .. $#formatted_sequences) \r\n         } # if/else number of phosphosites\r\n@@ -1716,7 +1643,6 @@\n \r\n foreach my $peptide (keys %data) {\r\n     if (exists($domain_2{$peptide}) and (defined $domain_2{$peptide}) and (not $domain_2{$peptide} eq "") ) {\r\n-        #ACE print "writing domain $domain_2{$peptide} for regulatory site(s) $seq_plus7aa_2{$peptide}\\n"; #ACE\r\n         $psp_regulatory_site_stmth->bind_param(1, $domain_2{$peptide});\r\n         $psp_regulatory_site_stmth->bind_param(2, $ON_FUNCTION_2{$peptide});\r\n         $psp_regulatory_site_stmth->bind_param(3, $ON_PROCESS_2{$peptide});\r\n@@ -1728,7 +1654,6 @@\n         if (not $psp_regulatory_site_stmth->execute()) {\r\n             print "Error writing PSP_Regulatory_site for one regulatory site with peptide \'$domain_2{$peptide}\': $psp_regulatory_site_stmth->errstr\\n";\r\n         } else {\r\n-            #ACE print "added domain for $domain_2{$peptide}\\n";\r\n         }\r\n     } elsif (exists($domain_2{$peptide}) and (not defined $domain_2{$peptide})) {\r\n         print "\\$domain_2{$peptide} is undefined\\n";  #ACE\r\n@@ -1989,7 +1914,6 @@\n                                         my $tmp_site_for_printing = $p_residues{$peptide}{$i}[$j] + 1;        # added 12.05.2012 for Justin\'s data\r\n                                         print OUT "$foobar";\r\n                                         print OUT "$tmp_site_for_printing\\t";\r\n-                                        #ACE print OUT "p$residues{$peptide}{$i}[$j]$tmp_site_for_printing\\t";\r\n                                         $tmp_for_insert .= "p$residues{$peptide}{$i}[$j]$tmp_site_for_printing";\r\n                                         $there_were_sites = 1;\r\n                                     }\r\n@@ -2049,7 +1973,6 @@\n     # begin store-to-SQLite "ppep_metadata" table\r\n     # ---\r\n     for $i (1..14) {\r\n-        #ACE print "\\$ppep_metadata_stmth->bind_param($i, " . $ppep_metadata[$i-1] . ")\\n";\r\n         $ppep_metadata_stmth->bind_param($i, $ppep_metadata[$i-1]);\r\n     }\r\n     if (not $ppep_metadata_stmth->execute()) {\r\n@@ -2074,7 +1997,6 @@\n         $ppep_intensity_stmth->bind_param( 1, $ppep_id                     );\r\n         $ppep_intensity_stmth->bind_param( 2, $sample_id_lut{$samples[$i]} );\r\n         $ppep_intensity_stmth->bind_param( 3, $intense                     );\r\n-        #ACE print "insert ($peptide, $samples[$i], $intense)\\n";\r\n         if (not $ppep_intensity_stmth->execute()) {\r\n             print "Error writing tuple ($peptide,$samples[$i],$intense): $ppep_intensity_stmth->errstr\\n";\r\n         }\r\n@@ -2103,13 +2025,11 @@\n         }\r\n         else { print OUT "\\t";}\r\n     }\r\n-    #ACE my %wrote_motif = {};\r\n     my %wrote_motif;\r\n     my $motif_parts_0;\r\n     for my $i (0 .. $#motif_sequence) {\r\n         if (exists($kinase_motif_matches{$peptide}{$motif_sequence[$i]})) {\r\n             print OUT "X\\t";\r\n-            #ACE my @motif_parts = split(/ motif /, $motif_type{$motif_sequence[$i]});\r\n             $motif_parts_0 = $motif_type{$motif_sequence[$i]}." ".$motif_sequence[$i];\r\n             my $key = "$peptide\\t$gene_names\\t$motif_parts_0";\r\n             if (!exists($wrote_motif{$key})) {\r\n'
b
diff -r 922d309640db -r d728198f1ba5 macros.xml
--- a/macros.xml Fri Mar 11 20:04:05 2022 +0000
+++ b/macros.xml Tue Mar 15 00:35:16 2022 +0000
b
@@ -1,4 +1,30 @@
 <macros>
-    <token name="@TOOL_VERSION@">0.1.0</token>
+    <token name="@TOOL_VERSION@">0.1.1</token>
     <token name="@VERSION_SUFFIX@">0</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="0.3.3"   >openblas</requirement>
+            <requirement type="package" version="0.4.0"   >r-sass</requirement>
+            <requirement type="package" version="1.14.2"  >r-data.table</requirement>
+            <requirement type="package" version="1.22.2"  >numpy</requirement>
+            <requirement type="package" version="1.4.0"   >pyahocorasick</requirement>
+            <requirement type="package" version="1.4.0"   >r-stringr</requirement>
+            <requirement type="package" version="1.4.1"   >pandas</requirement>
+            <requirement type="package" version="1.56.0"  >bioconductor-preprocesscore</requirement>
+            <requirement type="package" version="1.64"    >perl-dbd-sqlite</requirement>
+            <requirement type="package" version="1.7.1"   >r-optparse</requirement>
+            <requirement type="package" version="1.7.1"   >r-optparse</requirement>
+            <requirement type="package" version="2.11"    >r-rmarkdown</requirement>
+            <!--
+            It would be nice to use conda-forge/texlive-core, but issue 23 blocked PDF-creation.
+            Also, I got pango font errors (output had missing symbols replaced with boxes) unless
+            I specified the build as well as the version, i.e.
+            texlive-core=20210325=h97429d4_0
+            -->
+            <requirement type="package"                   >r-tinytex</requirement>
+            <requirement type="package" version="3.3.5"   >r-ggplot2</requirement>
+            <requirement type="package" version="3.9.10"  >python</requirement>
+            <requirement type="package" version="5.26.2"  >perl</requirement>
+        </requirements>
+    </xml>
 </macros>
b
diff -r 922d309640db -r d728198f1ba5 mqppep_anova.R
--- a/mqppep_anova.R Fri Mar 11 20:04:05 2022 +0000
+++ b/mqppep_anova.R Tue Mar 15 00:35:16 2022 +0000
b
@@ -196,9 +196,12 @@
 #  from run to run
 set.seed(28571)
 
+
+library(tinytex)
+tinytex::install_tinytex()
 rmarkdown::render(
   input = paste(script_dir, "mqppep_anova_script.Rmd", sep = "/")
-, output_format = rmarkdown::html_document(pandoc_args = "--self-contained")
+, output_format = rmarkdown::pdf_document()
 , output_file = report_file_name
 , params = rmarkdown_params
 )
b
diff -r 922d309640db -r d728198f1ba5 mqppep_anova.xml
--- a/mqppep_anova.xml Fri Mar 11 20:04:05 2022 +0000
+++ b/mqppep_anova.xml Tue Mar 15 00:35:16 2022 +0000
[
@@ -3,24 +3,23 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <requirements>
-        <requirement type="package" version="1.7.1"   >r-optparse</requirement>
-        <requirement type="package" version="1.4.0"   >r-stringr</requirement>
-        <requirement type="package" version="1.14.2"  >r-data.table</requirement>
-        <requirement type="package" version="3.3.5"   >r-ggplot2</requirement>
-        <requirement type="package" version="1.56.0"  >bioconductor-preprocesscore</requirement>
-        <requirement type="package" version="0.3.3"   >openblas</requirement>
-        <requirement type="package" version="2.11"    >r-rmarkdown</requirement>
-        <requirement type="package" version="0.4.0"   >r-sass</requirement>
-        <requirement type="package" version="20210325">texlive-core</requirement>
-
-    </requirements>
-    <!-- Rscript -e 'rmarkdown::render("QuantDataProcessingScript.Rmd")' -->
+    <expand macro="requirements"/>
+    <!--
+      The weird invocation used here is because knitr and install_tinytex
+      both need access to a writeable directory, but most directories in a
+      biocontainer are read-only, so this builds a pseudo-home under /tmp
+    -->
     <command detect_errors="exit_code"><![CDATA[
-      cd /tmp;
+      export OLD_PWD=\$(dirname \$(pwd));
+      export HOME=/tmp\${OLD_PWD};
+      mkdir -p \$HOME/bin;
+      mkdir -p \$HOME/tmp;
+      export TEMP=\$HOME/tmp;
+      export TMPDIR=\$TEMP;
+      cd \$TEMP;
       cp '$__tool_directory__/mqppep_anova_script.Rmd' . || exit 0;
       cp '$__tool_directory__/mqppep_anova.R' . || exit 0;
-      \${CONDA_PREFIX}/bin/Rscript /tmp/mqppep_anova.R 
+      \${CONDA_PREFIX}/bin/Rscript \$TEMP/mqppep_anova.R 
       --inputFile '$input_file' 
       --alphaFile $alpha_file
       --firstDataColumn $first_data_column
@@ -33,8 +32,8 @@
       --regexSampleGrouping $sample_grouping_regex_f
       --imputedDataFile $imputed_data_file
       --reportFile $report_file;
-      rm mqppep_anova_script.Rmd;
-      rm mqppep_anova.R
+      cd \${OLD_PWD};
+      rm -rf \$HOME
     ]]></command>
     <configfiles>
       <configfile name="sample_names_regex_f">
@@ -99,8 +98,11 @@
         </param>
     </inputs>
     <outputs>
-        <data name="imputed_data_file" format="tabular" label="${input_file.name}.intensities_${imputation.imputation_method}-imputed_QN_LT" ></data>
-        <data name="report_file" format="html" label="${input_file.name}.report (download/unzip to view)" ></data>
+        <data name="imputed_data_file" format="tabular" label="${input_file.name}.${imputation.imputation_method}-imputed_QN_LT_intensities" ></data>
+        <!--
+        <data name="report_file" format="html" label="${input_file.name}.${imputation.imputation_method}-imputed_report (download/unzip to view)" ></data>
+        -->
+        <data name="report_file" format="pdf" label="${input_file.name}.${imputation.imputation_method}-imputed_report" ></data>
     </outputs>
     <tests>
         <test>
@@ -124,6 +126,8 @@
             <param name="alpha_file" ftype="tabular" value="alpha_levels.tabular"/>
             <param name="first_data_column" value="10"/>
             <param name="imputation_method" value="random"/>
+            <param name="meanPercentile" value="1" />
+            <param name="sdPercentile" value="0.2" />
             <param name="sample_names_regex" value="\.\d+[A-Z]$"/>
             <param name="sample_grouping_regex" value="\d+"/>
             <output name="imputed_data_file">
@@ -192,14 +196,7 @@
   Phosphopeptide MS intensities where missing values have been **imputed** by the chosen method, quantile-normalized (**QN**), and log10-transformed (**LT**), in tabular format.
 
 ``report_file``
-  (download/unzip to view) Summary report for normalization, imputation, and ANOVA.
-  This dataset is displayed in Galaxy as having a datatype of ``html`` in Galaxy,
-  but it is in fact a zipfile; the zip file contains
-  an HTML file.  Please download and unzip it locally to view the report.
-  Ideally this report would be a PDF, but there is an issue
-  `(linked here)
-  <https://github.com/conda-forge/texlive-core-feedstock/issues/19>`_.
-  that needs to be resolved first.
+  Summary report for normalization, imputation, and ANOVA, in PDF format.
 
 **Authors**
 
b
diff -r 922d309640db -r d728198f1ba5 mqppep_anova_script.Rmd
--- a/mqppep_anova_script.Rmd Fri Mar 11 20:04:05 2022 +0000
+++ b/mqppep_anova_script.Rmd Tue Mar 15 00:35:16 2022 +0000
[
b'@@ -1,24 +1,32 @@\n ---\n-title: "Quant Data Processing Script"\n+title: "MaxQuant Phospho-Proteomic Enrichment Pipeline ANOVA"\n author: "Larry Cheng; Art Eschenlauer"\n date: "May 28, 2018; Nov 16, 2021"\n output:\n-  html_document: default\n   pdf_document: default\n params:\n-  inputFile: "Upstream_Map_pST_outputfile_STEP4.txt"\n-  alphaFile: "alpha_levels.txt"\n+  inputFile: "test-data/test_input_for_anova.tabular"\n+  alphaFile: "test-data/alpha_levels.tabular"\n   firstDataColumn: "Intensity"\n-  imputationMethod: !r c("group-median","median","mean","random")[4]\n+  imputationMethod: !r c("group-median", "median", "mean", "random")[1]\n   meanPercentile: 1\n   sdPercentile: 0.2\n   regexSampleNames: "\\\\.(\\\\d+)[A-Z]$"\n   regexSampleGrouping: "(\\\\d+)"\n   imputedDataFilename: "Upstream_Map_pST_outputfile_STEP4_QN_LT.txt"\n ---\n-```{r setup, include=FALSE}\n+```{r setup, include = FALSE}\n # ref for parameterizing Rmd document: https://stackoverflow.com/a/37940285\n-knitr::opts_chunk$set(echo = FALSE, fig.dim=c(9,10))\n+knitr::opts_chunk$set(echo = FALSE, fig.dim = c(9, 10))\n+\n+### FUNCTIONS\n+\n+#ANOVA filter function\n+anova_func <- function(x, grouping_factor) {\n+  x_aov <- aov(as.numeric(x) ~ grouping_factor)\n+  pvalue <- summary(x_aov)[[1]][["Pr(>F)"]][1]\n+  pvalue\n+}\n ```\n \n ## Purpose:\n@@ -28,156 +36,175 @@\n ## Variables to change for each input file\n -->\n ```{r include = FALSE}\n-#Input Filename\n-inputFile <- params$inputFile\n+# Input Filename\n+input_file <- params$inputFile\n \n-#First data column - ideally, this could be detected via regexSampleNames, but for now leave it as is.\n-firstDataColumn <- params$firstDataColumn\n-FDC_is_integer <- TRUE\n-firstDataColumn <- withCallingHandlers(\n-    as.integer(firstDataColumn)\n-  , warning = function(w) FDC_is_integer <<- FALSE\n+# First data column - ideally, this could be detected via regexSampleNames,\n+#   but for now leave it as is.\n+first_data_column <- params$firstDataColumn\n+fdc_is_integer <- TRUE\n+first_data_column <- withCallingHandlers(\n+    as.integer(first_data_column)\n+  , warning = function(w) fdc_is_integer <<- FALSE\n   )\n-if (FALSE == FDC_is_integer) {\n-  firstDataColumn <- params$firstDataColumn\n+if (FALSE == fdc_is_integer) {\n+  first_data_column <- params$firstDataColumn\n }\n \n-#False discovery rate adjustment for ANOVA (Since pY abundance is low, set to 0.10 and 0.20 in addition to 0.05)\n-valFDR <- read.table(file = params$alphaFile, sep = "\\t", header=F, quote="")[,1]\n+# False discovery rate adjustment for ANOVA\n+#  Since pY abundance is low, set to 0.10 and 0.20 in addition to 0.05\n+val_fdr <-\n+  read.table(file = params$alphaFile, sep = "\\t", header = F, quote = "")[, 1]\n \n #Imputed Data filename\n-imputedDataFilename <- params$imputedDataFilename\n+imputed_data_filename <- params$imputedDataFilename\n \n #ANOVA data filename\n ```\n \n-```{r include = FALSE}\n-#Imputation method, should be one of c("random","group-median","median","mean")\n-imputationMethod <- params$imputationMethod\n+```{r echo = FALSE}\n+# Imputation method, should be one of\n+#   "random", "group-median", "median", or "mean"\n+imputation_method <- params$imputationMethod\n \n-#Selection of percentile of logvalue data to set the mean for random number generation when using random imputation\n-meanPercentile <- params$meanPercentile / 100.0\n+# Selection of percentile of logvalue data to set the mean for random number\n+#   generation when using random imputation\n+mean_percentile <- params$meanPercentile / 100.0\n \n-#deviation adjustment-factor for random values; real number.\n-sdPercentile <- params$sdPercentile\n+# deviation adjustment-factor for random values; real number.\n+sd_percentile <- params$sdPercentile\n+\n+# Regular expression of Sample Names, e.g., "\\\\.(\\\\d+)[A-Z]$"\n+regex_sample_names <- params$regexSampleNames\n \n-#Regular expression of Sample Names, e.g., "\\\\.(\\\\d+)[A-Z]$"\n-regexSampleNames <- params$regexSampleNames\n-\n-#Regular expression to extract Sample Grouping from Sample Name (if error occurs, compare sampleNumbe'..b'(m)\n-      rownames(m) <- sapply(\n-          X = 1:nrow(m)\n-        , FUN = function(i) {\n+\n+\n+      anova_filtered <- data.table(\n+        anova_filtered_merge$Phosphopeptide\n+        ,\n+        anova_filtered_merge$Intensity\n+        ,\n+        anova_filtered_merge[, 2:number_of_samples + 1]\n+      )\n+      colnames(anova_filtered) <-\n+        c("Phosphopeptide", colnames(filtered_data_filtered))\n+\n+      # merge qualitative columns into the ANOVA data\n+      output_table <- data.frame(anova_filtered$Phosphopeptide)\n+      output_table <- merge(\n+        x = output_table\n+        ,\n+        y = data_table_imp_qn_lt\n+        ,\n+        by.x = "anova_filtered.Phosphopeptide"\n+        ,\n+        by.y = "Phosphopeptide"\n+      )\n+\n+      #Produce heatmap to visualize significance and the effect of imputation\n+      m <-\n+        as.matrix(unimputed_quant_data_log[anova_filtered_merge_order, ])\n+      if (nrow(m) > 0) {\n+        rownames_m <- rownames(m)\n+        rownames(m) <- sapply(\n+          X = seq_len(nrow(m))\n+          ,\n+          FUN = function(i) {\n             sprintf(\n-              ANOVA.filtered_merge.format[i]\n-            , filtered_p$FDRadjustedANOVAp[i]\n-            , rownames_m[i]\n+              anova_filtered_merge_format[i]\n+              ,\n+              filtered_p$fdr_adjusted_anova_p[i]\n+              ,\n+              rownames_m[i]\n             )\n           }\n         )\n-      margins <- c(\n-        max(nchar(colnames(m))) * 10 / 16 # col\n-      , max(nchar(rownames(m))) * 5 / 16 # row\n-      )\n-      how_many_peptides <- min(50, nrow(m))\n+        margins <- c(max(nchar(colnames(m))) * 10 / 16 # col\n+                     , max(nchar(rownames(m))) * 5 / 16 # row\n+                     )\n+                     how_many_peptides <- min(50, nrow(m))\n \n-      op <- par("cex.main")\n-      try(\n-        if (nrow(m) > 1) {\n-          par(cex.main=0.6)\n-          heatmap(\n-            m[how_many_peptides:1,]\n-          , Rowv = NA\n-          , Colv = NA\n-          , cexRow = 0.7\n-          , cexCol = 0.8\n-          , scale="row"\n-          , margins = margins\n-          , main = "Heatmap of unimputed, unnormalized intensities"\n-          , xlab = ""\n-          # , main = bquote(\n-          #     .( how_many_peptides )\n-          #       ~ " peptides with adjusted p-value <"\n-          #       ~ .(sprintf("%0.2f", cutoff))\n-          #     )\n-          )\n-        } \n-      )\n-      #ACE fig_dim knitr::opts_chunk$set(fig.dim = fig_dim)\n-      par(op)\n+                     cat("\\\\newpage\\n")\n+                     if (nrow(m) > 50) {\n+                       cat("Heatmap for the 50 most-significant peptides",\n+                         sprintf(\n+                           "whose adjusted p-value < %0.2f\\n",\n+                           cutoff)\n+                       )\n+                     } else {\n+                       cat("Heatmap for peptides whose",\n+                         sprintf("adjusted p-value < %0.2f\\n",\n+                         cutoff)\n+                       )\n+                     }\n+                     cat("\\\\newline\\n")\n+                     cat("\\\\newline\\n")\n+                     op <- par("cex.main")\n+                     try(\n+                       if (nrow(m) > 1) {\n+                         par(cex.main = 0.6)\n+                         heatmap(\n+                           m[how_many_peptides:1, ],\n+                           Rowv = NA,\n+                           Colv = NA,\n+                           cexRow = 0.7,\n+                           cexCol = 0.8,\n+                           scale = "row",\n+                           margins = margins,\n+                           main =\n+                             "Heatmap of unimputed, unnormalized intensities",\n+                           xlab = ""\n+                           )\n+                       }\n+                     )\n+                     par(op)\n+      }\n     }\n-    \n   }\n }\n ```\n \n+<!--\n ## Peptide IDs, etc.\n \n See output files.\n+-->\n'
b
diff -r 922d309640db -r d728198f1ba5 repository_dependencies.xml
--- a/repository_dependencies.xml Fri Mar 11 20:04:05 2022 +0000
+++ b/repository_dependencies.xml Tue Mar 15 00:35:16 2022 +0000
b
@@ -1,5 +1,5 @@
 <?xml version="1.0" ?>
 <repositories description="Suite for preprocessing and ANOVA of MaxQuant results using LC-MS proteomics data from phosphoproteomic enrichment.">
-    <repository name="mqppep_preproc" owner="eschen42" toolshed="https://testtoolshed.g2.bx.psu.edu" changeset_revision="b91809a18dbe"/>
-    <repository name="mqppep_anova" owner="eschen42" toolshed="https://testtoolshed.g2.bx.psu.edu" changeset_revision="d4d531006735"/>
+    <repository name="mqppep_preproc" owner="eschen42" toolshed="https://testtoolshed.g2.bx.psu.edu" changeset_revision="42daf70d4ed4"/>
+    <repository name="mqppep_anova" owner="eschen42" toolshed="https://testtoolshed.g2.bx.psu.edu" changeset_revision="922d309640db"/>
 </repositories>
\ No newline at end of file
b
diff -r 922d309640db -r d728198f1ba5 workflow/ppenrich_suite_wf.ga
--- a/workflow/ppenrich_suite_wf.ga Fri Mar 11 20:04:05 2022 +0000
+++ b/workflow/ppenrich_suite_wf.ga Tue Mar 15 00:35:16 2022 +0000
[
b'@@ -28,20 +28,20 @@\n             "name": "Input dataset",\n             "outputs": [],\n             "position": {\n-                "bottom": 257.06666564941406,\n-                "height": 81.39999389648438,\n-                "left": 339.95001220703125,\n-                "right": 539.9500122070312,\n-                "top": 175.6666717529297,\n+                "bottom": -36.30000305175781,\n+                "height": 82.19999694824219,\n+                "left": 150,\n+                "right": 350,\n+                "top": -118.5,\n                 "width": 200,\n-                "x": 339.95001220703125,\n-                "y": 175.6666717529297\n+                "x": 150,\n+                "y": -118.5\n             },\n             "tool_id": null,\n-            "tool_state": "{\\"optional\\": false, \\"format\\": [\\"tabular\\"], \\"tag\\": null}",\n+            "tool_state": "{\\"optional\\": false, \\"format\\": [\\"tabular\\"]}",\n             "tool_version": null,\n             "type": "data_input",\n-            "uuid": "002d55e6-29a5-426d-9248-70ec33424b15",\n+            "uuid": "f4273d40-f2b8-4ad0-8bcc-91e72bd25fe1",\n             "workflow_outputs": []\n         },\n         "1": {\n@@ -60,20 +60,20 @@\n             "name": "Input dataset",\n             "outputs": [],\n             "position": {\n-                "bottom": 411.4666748046875,\n-                "height": 101.79998779296875,\n-                "left": 379.95001220703125,\n-                "right": 579.9500122070312,\n-                "top": 309.66668701171875,\n+                "bottom": 278.1000061035156,\n+                "height": 102.60000610351562,\n+                "left": 376,\n+                "right": 576,\n+                "top": 175.5,\n                 "width": 200,\n-                "x": 379.95001220703125,\n-                "y": 309.66668701171875\n+                "x": 376,\n+                "y": 175.5\n             },\n             "tool_id": null,\n-            "tool_state": "{\\"optional\\": false, \\"format\\": [\\"fasta\\"], \\"tag\\": null}",\n+            "tool_state": "{\\"optional\\": false, \\"format\\": [\\"fasta\\"]}",\n             "tool_version": null,\n             "type": "data_input",\n-            "uuid": "8f079dcc-1843-47cd-b4dc-1830e4466430",\n+            "uuid": "cb31b0ac-cacc-42ee-bd42-f42d0bdae128",\n             "workflow_outputs": []\n         },\n         "2": {\n@@ -92,20 +92,20 @@\n             "name": "Input dataset",\n             "outputs": [],\n             "position": {\n-                "bottom": 573.4666748046875,\n-                "height": 101.79998779296875,\n-                "left": 418.95001220703125,\n-                "right": 618.9500122070312,\n-                "top": 471.66668701171875,\n+                "bottom": 423.1000061035156,\n+                "height": 102.60000610351562,\n+                "left": 387,\n+                "right": 587,\n+                "top": 320.5,\n                 "width": 200,\n-                "x": 418.95001220703125,\n-                "y": 471.66668701171875\n+                "x": 387,\n+                "y": 320.5\n             },\n             "tool_id": null,\n-            "tool_state": "{\\"optional\\": false, \\"format\\": [\\"tabular\\"], \\"tag\\": null}",\n+            "tool_state": "{\\"optional\\": false, \\"format\\": [\\"tabular\\"]}",\n             "tool_version": null,\n             "type": "data_input",\n-            "uuid": "dc894a94-97a3-40ff-811e-01b30d498478",\n+            "uuid": "e6ec01b8-ff1a-4c90-a064-b40c5cad75bb",\n             "workflow_outputs": []\n         },\n         "3": {\n@@ -124,20 +124,20 @@\n             "name": "Input dataset",\n             "outputs": [],\n             "position": {\n-                "bottom": 726.0666809082031,\n-                "height": 81.39999389648438,\n-                "left": 459.95001220703125,\n-                "right": 659.9500122070312,\n-                "top": 644.6666870117188,\n+                "bottom": 546.6999969482422,\n+                "height": 82.19999694824219,\n+                "left": 399,\n+                "right": 599,\n+  '..b'x": 1202.949951171875,\n-                "y": 1233.1666259765625\n+                "x": 1058,\n+                "y": 1093\n             },\n             "post_job_actions": {\n                 "RenameDatasetActionimputed_data_file": {\n@@ -556,19 +581,19 @@\n             },\n             "tool_id": "mqppep_anova",\n             "tool_state": "{\\"alpha_file\\": {\\"__class__\\": \\"ConnectedValue\\"}, \\"first_data_column\\": \\"Intensity\\", \\"imputation\\": {\\"imputation_method\\": \\"group-median\\", \\"__current_case__\\": 0}, \\"input_file\\": {\\"__class__\\": \\"ConnectedValue\\"}, \\"sample_grouping_regex\\": \\"(\\\\\\\\d+)\\", \\"sample_names_regex\\": \\"\\\\\\\\.(\\\\\\\\d+)[A-Z]$\\", \\"__page__\\": null, \\"__rerun_remap_job_id__\\": null}",\n-            "tool_version": "0.1.0+galaxy0",\n+            "tool_version": null,\n             "type": "tool",\n-            "uuid": "2257286b-6f9a-45c1-90a3-bf5b972959d5",\n+            "uuid": "a3cb902d-8ef6-4f84-bed3-80b2b20d1916",\n             "workflow_outputs": [\n                 {\n                     "label": "intensities_group-mean-imputed_QN_LT",\n                     "output_name": "imputed_data_file",\n-                    "uuid": "8e7317c6-95e9-4454-b4d7-31b4de6167a8"\n+                    "uuid": "ef19dcd3-8f3e-4fc4-829e-dae6719ff1cc"\n                 },\n                 {\n                     "label": "intensities_group-mean-imputed_report",\n                     "output_name": "report_file",\n-                    "uuid": "dfe9b34e-1f3e-4971-8382-41178104e253"\n+                    "uuid": "26bb93b0-bc11-4455-a280-241253b21981"\n                 }\n             ]\n         },\n@@ -601,14 +626,14 @@\n                 }\n             ],\n             "position": {\n-                "bottom": 1325.0999603271484,\n-                "height": 254.93333435058594,\n-                "left": 1452.949951171875,\n-                "right": 1652.949951171875,\n-                "top": 1070.1666259765625,\n+                "bottom": 1186,\n+                "height": 256,\n+                "left": 1308,\n+                "right": 1508,\n+                "top": 930,\n                 "width": 200,\n-                "x": 1452.949951171875,\n-                "y": 1070.1666259765625\n+                "x": 1308,\n+                "y": 930\n             },\n             "post_job_actions": {\n                 "RenameDatasetActionimputed_data_file": {\n@@ -628,19 +653,19 @@\n             },\n             "tool_id": "mqppep_anova",\n             "tool_state": "{\\"alpha_file\\": {\\"__class__\\": \\"ConnectedValue\\"}, \\"first_data_column\\": \\"Intensity\\", \\"imputation\\": {\\"imputation_method\\": \\"random\\", \\"__current_case__\\": 3, \\"meanPercentile\\": \\"1\\", \\"sdPercentile\\": \\"0.2\\"}, \\"input_file\\": {\\"__class__\\": \\"ConnectedValue\\"}, \\"sample_grouping_regex\\": \\"(\\\\\\\\d+)\\", \\"sample_names_regex\\": \\"\\\\\\\\.(\\\\\\\\d+)[A-Z]$\\", \\"__page__\\": null, \\"__rerun_remap_job_id__\\": null}",\n-            "tool_version": "0.1.0+galaxy0",\n+            "tool_version": null,\n             "type": "tool",\n-            "uuid": "9516971c-8532-4797-8bf9-4655ff104dbd",\n+            "uuid": "217d92af-f6d6-4fd3-a78a-090d8afd3ae0",\n             "workflow_outputs": [\n                 {\n                     "label": "intensities_randomly-imputed_QN_LT",\n                     "output_name": "imputed_data_file",\n-                    "uuid": "8ceda029-d5fd-4d75-a2b3-ac582bb137c3"\n+                    "uuid": "925d734f-f9d8-49e8-aebb-c8d7598d45b2"\n                 },\n                 {\n                     "label": "intensities_randomly-imputed_report",\n                     "output_name": "report_file",\n-                    "uuid": "84bedf25-c15b-4cc7-97e0-92f746e89f9c"\n+                    "uuid": "4ab5f1b1-d04e-4634-8765-265122bc1064"\n                 }\n             ]\n         }\n@@ -648,6 +673,6 @@\n     "tags": [\n         "ppenrich"\n     ],\n-    "uuid": "ac7bf2d1-89fe-4bf6-920a-d5508842d3f9",\n-    "version": 7\n+    "uuid": "c54c2b2e-8080-445c-bc3e-43950c89d4e4",\n+    "version": 3\n }\n\\ No newline at end of file\n'