Looks like all the extra text referred to in the preceding comment is coming from multiple "print" statements in the function "Gentoype_DE_Analysis."
Also, there is a lot of code in "Gentoype_DE_Analysis" that seems unneeded for this particular analysis.
I think a good way to manage this would be to create a new, single Markdown that uses the basic structure of "FindDifferentiallyExpressedGenes.Rmd", but including volcano plots and using DESeq functionality.
For the output, let's create a tab-delimited plain-text table (not an Excel spreadsheet) that looks like:
1) gene_name
2) group1 (the baseline, e.g., the group that was considered the control, expressed as the sample group prefix, such as A.28.15)
3) group2 (the group considered as the treatment, e.g., the heat-stressed sample)
4) p-value
5) Q (false discovery rate, i.e., an adjusted p-value)
This file will be quite large, so let's gzip-compress it.
The goal of this file is to have a text-file with all the differential expression analysis results, which we can then use in subsequent analysis steps.
These subsequent analysis steps would include making a spreadsheet that would allow users to inspect the DE genes in Integrated Genome browser. That file could be an Excel spreadsheet that would contain all rows with Q <= 0.10, a very liberal threshold for deciding differential expression, meaning: many of the results will be false positives.
This secondary file, created to facilitate interactive visualization, would look like:
1) gene_name - hyperlinked to the gene's location in IGB
2) group1 (e.g., A.28.15)
3) group2 (e.g., A.34.15)
4) group1 average, computed from the scaled counts file values
5) group1 variance, computed from the scaled counts file values
6) group2 average, computed from the scaled counts file values
7) group2 variance, computed from the scaled counts file values
8) Q (the false discovery rate for the differential gene expression result)
9) gene description
In this latter file, we'll show numeric values rounded to 3 significant digits.
Branch: https://bitbucket.org/mdavis4290/molly-flavonoid-rnaseq/branch/IGBF-3339
Pull Request: https://bitbucket.org/hotpollen/flavonoid-rnaseq/pull-requests/16