diff aurora_wgcna.Rmd @ 10:96ba1a8fff06 draft

Uploaded
author spficklin
date Fri, 06 Dec 2019 13:15:35 -0500
parents b14e4bf568b0
children 53fc3fdf5e9a
line wrap: on
line diff
--- a/aurora_wgcna.Rmd	Fri Dec 06 12:15:36 2019 -0500
+++ b/aurora_wgcna.Rmd	Fri Dec 06 13:15:35 2019 -0500
@@ -8,6 +8,9 @@
 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
 knitr::opts_chunk$set(error = FALSE, echo = FALSE)
 ```
+```{r, include=FALSE}
+options(tinytex.verbose = TRUE)
+```
 
 ```{r}
 # Make a directory for saving the figures.
@@ -15,7 +18,7 @@
 ```
 
 # Introduction
-This report contains step-by-step results from use of the [Aurora Galaxy](https://github.com/statonlab/aurora-galaxy-tools) Weighted Gene Co-expression Network Analysis [WGCNA](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-9-559) tool. This tool wraps the WGCNA R package into a ready-to-use Rmarkdown file.  It performs module discovery and network construction using a dataset and optional trait data matrix provided.  
+This report contains step-by-step results from use of the [Aurora Galaxy](https://github.com/statonlab/aurora-galaxy-tools) Weighted Gene Co-expression Network Analysis [WGCNA](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-9-559) tool. This tool wraps the WGCNA R package into a ready-to-use Rmarkdown file.  It performs module discovery and network construction using a dataset and optional trait data matrix provided.
 
 If you provided trait data, a second report will be available with results comparing the trait values to the identified modules.
 
@@ -64,13 +67,13 @@
 if (!is.null(opt$trait_data)) {
   print('The column in the trait data that contains the sample name:')
   print(opt$sname_col)
-  
+
   print('The character string used to identify missing values in the trait data:')
   print(opt$missing_value2)
-  
+
   print('Columns in the trait data that should be treated as categorical:')
   print(opt$one_hot_cols)
-  
+
   print('Columns in the trait data that should be ignored:')
   print(opt$ignore_cols)
 }
@@ -83,7 +86,7 @@
 - Do the values set for missing values match the values in the input files, and is the missing value used consistently within the input files (i.e you don't have more than one such as 0.0 and 0, or NA and 0.0)
 - If trait data was provided, check that the column specified for the sample name is correct.
 - The block size should not exceed 10,000 and should not be lower than 1,000.
-- Ensure that the sample names and all headers in the trait/phenotype data only contain alpha-numeric and underscore characters. 
+- Ensure that the sample names and all headers in the trait/phenotype data only contain alpha-numeric and underscore characters.
 
 
 # Expression Data
@@ -201,7 +204,7 @@
   text(sft$fitIndices[,1], -sign(sft$fitIndices[,3])*sft$fitIndices[,2],
        labels=powers,cex=0.5,col="red");
   #abline(h=th, col="blue")
-  
+
   # Mean connectivity as a function of the soft-thresholding power.
   plot(sft$fitIndices[,1], sft$fitIndices[,5],
        xlab="Soft Threshold (power)",ylab="Mean Connectivity", type="n",
@@ -292,7 +295,7 @@
   plotClusterDendro <- function() {
     plotDendroAndColors(net$dendrograms[[i]], colors,
                         "Module colors", dendroLabels = FALSE, hang = 0.03,
-                        addGuide = TRUE, guideHang = 0.05, 
+                        addGuide = TRUE, guideHang = 0.05,
                         main=paste('Cluster Dendgrogram, Block', i))
   }
   png(paste0('figures/06-cluster_dendrogram_block_', i, '.png'), width=6 ,height=4, units="in", res=300)
@@ -327,7 +330,7 @@
   plotDiss = selectTOM^7;
   diag(plotDiss) = NA;
   colors = sub('ME','', selectColors)
-  
+
   png(paste0('figures/06-TOM_heatmap_block_', i, '.png'), width=6 ,height=6, units="in", res=300)
   TOMplot(plotDiss, selectTree, colors, main = paste('TOM Heatmap, Block', i))
   dev.off()