Mercurial > repos > yhoogstrate > edger_with_design_matrix
comparison edgeR_Differential_Gene_Expression.xml @ 120:5c94a732bd62 draft
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 608485ef08f6221f3247dafe3f8b0ab451871795
author | yhoogstrate |
---|---|
date | Sat, 12 Dec 2015 05:21:15 -0500 |
parents | 0a05f6a91d71 |
children | 6c90a67a13fa |
comparison
equal
deleted
inserted
replaced
119:0a05f6a91d71 | 120:5c94a732bd62 |
---|---|
79 R --vanilla --slave -f $R_script '--args | 79 R --vanilla --slave -f $R_script '--args |
80 $expression_matrix | 80 $expression_matrix |
81 $design_matrix | 81 $design_matrix |
82 $contrast | 82 $contrast |
83 | 83 |
84 $analysis_report_genes | |
84 $fdr | 85 $fdr |
85 | 86 |
86 $output_count_edgeR | 87 $output_count_edgeR |
87 $output_cpm | 88 $output_cpm |
88 | 89 |
172 | 173 |
173 expression_matrix_file <- args[1] | 174 expression_matrix_file <- args[1] |
174 design_matrix_file <- args[2] | 175 design_matrix_file <- args[2] |
175 contrast <- args[3] | 176 contrast <- args[3] |
176 | 177 |
177 fdr <- args[4] | 178 truncate_table_by_fdr <- args[4] |
178 | 179 fdr <- as.double(args[5]) |
179 output_count_edgeR <- args[5] | 180 |
180 output_cpm <- args[6] | 181 output_count_edgeR <- args[6] |
181 | 182 output_cpm <- args[7] |
182 output_xpkm <- args[7] ##FPKM file - to be implemented | 183 |
183 | 184 output_xpkm <- args[8] ##FPKM file - to be implemented |
184 output_raw_counts <- args[8] | 185 |
185 | 186 output_raw_counts <- args[9] |
186 output_MDSplot_logFC <- args[9] | 187 |
187 output_MDSplot_logFC_coordinates <- args[10] | 188 output_MDSplot_logFC <- args[10] |
188 | 189 output_MDSplot_logFC_coordinates <- args[11] |
189 output_MDSplot_bcv <- args[11] | 190 |
190 output_MDSplot_bcv_coordinates <- args[12] | 191 output_MDSplot_bcv <- args[12] |
191 | 192 output_MDSplot_bcv_coordinates <- args[13] |
192 output_BCVplot <- args[13] | 193 |
193 output_MAplot <- args[14] | 194 output_BCVplot <- args[14] |
194 output_PValue_distribution_plot <- args[15] | 195 output_MAplot <- args[15] |
195 output_hierarchical_clustering_plot <- args[16] | 196 output_PValue_distribution_plot <- args[16] |
196 output_heatmap_plot <- args[17] | 197 output_hierarchical_clustering_plot <- args[17] |
197 output_RData_obj <- args[18] | 198 output_heatmap_plot <- args[18] |
198 output_format_images <- args[19] | 199 output_RData_obj <- args[19] |
200 output_format_images <- args[20] | |
199 | 201 |
200 | 202 |
201 ## Obtain read-counts | 203 ## Obtain read-counts |
202 expression_matrix <- read.delim(expression_matrix_file,header=T,stringsAsFactors=F,row.names=1,check.names=FALSE,na.strings=c("")) | 204 expression_matrix <- read.delim(expression_matrix_file,header=T,stringsAsFactors=F,row.names=1,check.names=FALSE,na.strings=c("")) |
203 design_matrix <- read.delim(design_matrix_file,header=T,stringsAsFactors=F,row.names=1,check.names=FALSE,na.strings=c("")) | 205 design_matrix <- read.delim(design_matrix_file,header=T,stringsAsFactors=F,row.names=1,check.names=FALSE,na.strings=c("")) |
386 cont <- c(contrast) | 388 cont <- c(contrast) |
387 cont <- makeContrasts(contrasts=cont, levels=design) | 389 cont <- makeContrasts(contrasts=cont, levels=design) |
388 | 390 |
389 lrt <- glmLRT(fit, contrast=cont[,1]) | 391 lrt <- glmLRT(fit, contrast=cont[,1]) |
390 write(paste("Exporting DGE results to file...",output_count_edgeR,sep=""),stdout()) | 392 write(paste("Exporting DGE results to file...",output_count_edgeR,sep=""),stdout()) |
391 write.table(file=output_count_edgeR,topTags(lrt,n=nrow(read_counts))\$table,sep="\t",row.names=TRUE,col.names=NA) | 393 |
394 if(truncate_table_by_fdr =="all") { | |
395 write.table(file=output_count_edgeR,topTags(lrt,n=nrow(read_counts))\$table,sep="\t",row.names=TRUE,col.names=NA) | |
396 } | |
397 else { | |
398 write.table(file=output_count_edgeR,subset(topTags(lrt,n=nrow(read_counts))\$table, FDR < fdr),sep="\t",row.names=TRUE,col.names=NA) | |
399 } | |
392 write.table(file=output_cpm,cpm(dge,normalized.lib.sizes=TRUE),sep="\t",row.names=TRUE,col.names=NA) | 400 write.table(file=output_cpm,cpm(dge,normalized.lib.sizes=TRUE),sep="\t",row.names=TRUE,col.names=NA) |
393 | 401 |
394 ## todo EXPORT FPKM | 402 ## todo EXPORT FPKM |
395 write.table(file=output_raw_counts,dge\$counts,sep="\t",row.names=TRUE,col.names=NA) | 403 write.table(file=output_raw_counts,dge\$counts,sep="\t",row.names=TRUE,col.names=NA) |
396 | 404 |
528 <param name="contrast" type="text" label="Contrast (biological question)" | 536 <param name="contrast" type="text" label="Contrast (biological question)" |
529 help="e.g. 'tumor-normal' or '(G1+G2)/2-G3' using the factors chosen in the design matrix. Read the 'makeContrasts' manual from Limma package for more info: http://www.bioconductor.org/packages/release/bioc/html/limma.html and http://www.bioconductor.org/packages/release/bioc/vignettes/limma/inst/doc/usersguide.pdf." /> | 537 help="e.g. 'tumor-normal' or '(G1+G2)/2-G3' using the factors chosen in the design matrix. Read the 'makeContrasts' manual from Limma package for more info: http://www.bioconductor.org/packages/release/bioc/html/limma.html and http://www.bioconductor.org/packages/release/bioc/vignettes/limma/inst/doc/usersguide.pdf." /> |
530 </when> | 538 </when> |
531 </conditional> | 539 </conditional> |
532 | 540 |
533 <param name="fdr" type="float" min="0" max="1" value="0.05" label="False Discovery Rate (FDR)" /> | 541 <param name="analysis_report_genes" type="select" label="Report differentially expressed genes"> |
542 <option value="all" selected="true">All genes</option> | |
543 <option value="significant">Only significant (defined by FDR cutoff)</option> | |
544 </param> | |
545 | |
546 <param name="fdr" type="float" min="0" max="1" value="0.01" label="False Discovery Rate (FDR) cutoff" help="Used to highlight significant genes in figures" /> | |
534 | 547 |
535 <param name="outputs" type="select" label="Optional desired outputs" multiple="true" display="checkboxes"> | 548 <param name="outputs" type="select" label="Optional desired outputs" multiple="true" display="checkboxes"> |
536 <option value="make_output_raw_counts">Raw counts table</option> | 549 <option value="make_output_raw_counts">Raw counts table</option> |
537 <option value="make_output_MDSplot_logFC">MDS-plot (logFC-method)</option> | 550 <option value="make_output_MDSplot_logFC">MDS-plot (logFC-method)</option> |
538 <option value="make_output_MDSplot_logFC_coordinates">MDS-plot coordinates table (logFC-method)</option> | 551 <option value="make_output_MDSplot_logFC_coordinates">MDS-plot coordinates table (logFC-method)</option> |
659 <param name="expression_matrix" value="Differential_Gene_Expression/expression_matrix.tabular.txt" /> | 672 <param name="expression_matrix" value="Differential_Gene_Expression/expression_matrix.tabular.txt" /> |
660 <param name="design_matrix" value="Differential_Gene_Expression/design_matrix.tabular.txt" /> | 673 <param name="design_matrix" value="Differential_Gene_Expression/design_matrix.tabular.txt" /> |
661 | 674 |
662 <param name="contrast" value="E-C"/> | 675 <param name="contrast" value="E-C"/> |
663 | 676 |
677 <param name="analysis_report_genes" value="all"/> | |
678 <param name="fdr" value="0.01" /> | |
679 | |
680 <output name="output_count_edgeR" file="Differential_Gene_Expression/differentially_expressed_genes.tabular.txt" /> | |
681 </test> | |
682 <test> | |
683 <param name="analysis_select" value="multi_factor" /> | |
684 | |
685 <param name="expression_matrix" value="Differential_Gene_Expression/expression_matrix.tabular.txt" /> | |
686 <param name="design_matrix" value="Differential_Gene_Expression/design_matrix.tabular.txt" /> | |
687 | |
688 <param name="contrast" value="E-C"/> | |
689 | |
690 <param name="analysis_report_genes" value="significant"/> | |
664 <param name="fdr" value="0.05" /> | 691 <param name="fdr" value="0.05" /> |
692 | |
693 <output name="output_count_edgeR" file="Differential_Gene_Expression/differentially_expressed_genes.significant.tabular.txt" /> | |
694 </test> | |
695 <test> | |
696 <param name="analysis_select" value="2_factor" /> | |
697 | |
698 <param name="factorLevel_control" value="C" /> | |
699 <param name="countsFile_control" value="Differential_Gene_Expression/C1,Differential_Gene_Expression/C2,Differential_Gene_Expression/C3,Differential_Gene_Expression/C4" ftype="tabular" /> | |
700 | |
701 <param name="factorLevel_condition" value="E" /> | |
702 <param name="countsFile_condition" value="Differential_Gene_Expression/E1,Differential_Gene_Expression/E2,Differential_Gene_Expression/E3,Differential_Gene_Expression/E4" ftype="tabular" /> | |
703 | |
704 <param name="analysis_report_genes" value="all"/> | |
705 <param name="fdr" value="0.01" /> | |
665 | 706 |
666 <output name="output_count_edgeR" file="Differential_Gene_Expression/differentially_expressed_genes.tabular.txt" /> | 707 <output name="output_count_edgeR" file="Differential_Gene_Expression/differentially_expressed_genes.tabular.txt" /> |
667 </test> | 708 </test> |
668 <test> | 709 <test> |
669 <param name="analysis_select" value="2_factor" /> | 710 <param name="analysis_select" value="2_factor" /> |
672 <param name="countsFile_control" value="Differential_Gene_Expression/C1,Differential_Gene_Expression/C2,Differential_Gene_Expression/C3,Differential_Gene_Expression/C4" ftype="tabular" /> | 713 <param name="countsFile_control" value="Differential_Gene_Expression/C1,Differential_Gene_Expression/C2,Differential_Gene_Expression/C3,Differential_Gene_Expression/C4" ftype="tabular" /> |
673 | 714 |
674 <param name="factorLevel_condition" value="E" /> | 715 <param name="factorLevel_condition" value="E" /> |
675 <param name="countsFile_condition" value="Differential_Gene_Expression/E1,Differential_Gene_Expression/E2,Differential_Gene_Expression/E3,Differential_Gene_Expression/E4" ftype="tabular" /> | 716 <param name="countsFile_condition" value="Differential_Gene_Expression/E1,Differential_Gene_Expression/E2,Differential_Gene_Expression/E3,Differential_Gene_Expression/E4" ftype="tabular" /> |
676 | 717 |
718 <param name="analysis_report_genes" value="significant"/> | |
677 <param name="fdr" value="0.05" /> | 719 <param name="fdr" value="0.05" /> |
678 | 720 |
679 <output name="output_count_edgeR" file="Differential_Gene_Expression/differentially_expressed_genes.tabular.txt" /> | 721 <output name="output_count_edgeR" file="Differential_Gene_Expression/differentially_expressed_genes.significant.tabular.txt" /> |
680 </test> | 722 </test> |
681 </tests> | 723 </tests> |
682 | 724 |
683 <help> | 725 <help> |
684 edgeR: Differential Gene(Expression) Analysis | 726 edgeR: Differential Gene(Expression) Analysis |