Mercurial > repos > erasmus-medical-center > voom_transform
changeset 0:c6a3a93a237e draft default tip
planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
author | erasmus-medical-center |
---|---|
date | Wed, 25 Jan 2017 10:13:10 -0500 |
parents | |
children | |
files | test-data/em.txt test-data/em_transformed.txt voom_transform.R voom_transform.xml |
diffstat | 4 files changed, 141 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/em.txt Wed Jan 25 10:13:10 2017 -0500 @@ -0,0 +1,24 @@ +Geneid s01 s02 s03 s04 s05 s06 s07 s08 s09 s10 s11 s12 s13 s14 s15 s16 +GENE_0000096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0000291 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0000382 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0000775 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0001482 1 3 1 1 4 0 0 0 1 0 1 4 2 4 2 4 +GENE_0001809 0 1 3 0 0 0 0 1 1 1 1 1 0 1 0 0 +GENE_0001844 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0002231 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0002319 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0002401 0 0 6 1 3 2 0 0 0 1 2 5 5 0 3 0 +GENE_0002494 6 3 0 1 1 2 1 2 3 0 2 0 3 7 2 3 +GENE_0002571 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0003914 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0003940 438 383 277 365 310 252 195 238 660 554 427 313 351 369 382 572 +GENE_0004029 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +GENE_0004039 50 66 43 44 28 57 14 46 31 43 52 42 34 23 35 79 +GENE_0004049 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +GENE_0004059 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +GENE_0004069 1 1 1 0 0 0 0 0 0 0 0 0 0 2 1 0 +GENE_0004079 11 11 8 8 16 8 5 11 13 16 7 7 6 4 7 9 +GENE_0004089 171 198 79 136 171 134 112 89 141 173 126 94 116 151 199 153 +GENE_0004099 286 349 203 274 319 248 254 288 297 253 235 279 227 208 286 207 +GENE_0004111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/em_transformed.txt Wed Jan 25 10:13:10 2017 -0500 @@ -0,0 +1,24 @@ + s01 s02 s03 s04 s05 s06 s07 s08 s09 s10 s11 s12 s13 s14 s15 s16 +GENE_0000096 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0000291 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0000382 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0000775 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0001482 10.6021459378899 11.7502388046096 11.2357602999147 10.817826403275 12.3650916394482 9.47213695068688 9.74669322641589 9.52855654574918 10.3516241433696 8.90642900704567 10.7784388104248 12.5584617505112 11.712400048862 12.5109065208515 11.4111463207977 12.0958690215726 +GENE_0001809 9.01718343716873 10.5278463832732 12.4581527212512 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 11.1135190464703 10.3516241433696 10.4913915077668 10.7784388104248 10.9734992497901 9.39047195397465 10.9259440201303 9.08921822591037 8.9259440201303 +GENE_0001844 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0002231 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0002319 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0002401 9.01718343716873 8.94288388255201 13.3512375173347 10.817826403275 12.0025215600635 11.7940650455742 9.74669322641589 9.52855654574918 8.76666164264849 10.4913915077668 11.515404404591 12.8479683677062 12.8499035726119 9.34098151940914 11.896573147968 8.9259440201303 +GENE_0002494 12.7176231553098 11.7502388046096 9.65079779919357 10.817826403275 10.780129138727 11.7940650455742 11.331655727137 11.8504846406365 11.5740165647061 8.90642900704567 11.515404404591 9.38853674906894 12.1978268760323 13.2478721150177 11.4111463207977 11.7332989421879 +GENE_0002571 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0003914 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0003940 18.7936164696135 18.5259666500549 18.767141760431 18.7465914985063 18.4736160962264 18.452276528326 18.3577180237232 18.4264020017547 19.1340763938953 19.0214726572074 18.9332569194769 18.680858381871 18.8478528330472 18.8704120735553 18.6685341634904 19.0870759031146 +GENE_0004029 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0004039 15.6753949199205 15.9981663180532 16.0937412950423 15.7085973335202 15.0280566521706 16.3176270016313 14.6046742215435 16.0677153568572 14.7439415661484 15.3493725028944 15.9077218273698 15.7979276852066 15.4989964107528 14.8955703710868 15.238965345415 16.2388269754146 +GENE_0004049 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 10.9259440201303 9.08921822591037 8.9259440201303 +GENE_0004059 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 11.1135190464703 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303 +GENE_0004069 10.6021459378899 10.5278463832732 11.2357602999147 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 11.6629096142965 10.6741807266315 8.9259440201303 +GENE_0004079 13.5407453932257 13.466445838609 13.7382606404439 13.3203267438042 14.2395607573643 13.5595997919372 13.2061248450532 14.0521185018062 13.521549144812 13.9508231264041 13.1003669053122 13.2954273446775 13.0909116721157 12.5109065208515 12.9961088215189 13.1738715335739 +GENE_0004089 17.4392482033415 17.575879079695 16.9636807544779 17.3256210434737 17.6172314041787 17.5435993132435 17.5604744176329 17.0123723230134 16.9113198854804 17.3452208596239 17.176469884398 16.95077917329 17.2546580986289 17.5841555028821 17.7294631621327 17.1880388655005 +GENE_0004099 18.1795747659256 18.3920325279274 18.3196827834598 18.333526241559 18.5148387589529 18.4292389922492 18.7382150724916 18.7009840543947 17.9834075008438 17.892270944049 18.0730595593165 18.5152412219121 18.2201946890607 18.0448850928538 18.2516095546673 17.6229115463646 +GENE_0004111 9.01718343716873 8.94288388255201 9.65079779919357 9.23286390255383 9.19516663800588 9.47213695068688 9.74669322641589 9.52855654574918 8.76666164264849 8.90642900704567 9.19347630970368 9.38853674906894 9.39047195397465 9.34098151940914 9.08921822591037 8.9259440201303
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/voom_transform.R Wed Jan 25 10:13:10 2017 -0500 @@ -0,0 +1,18 @@ +#!/usr/bin/env Rscript + +options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) +loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") + +library("getopt") +library("limma") + +spec <- matrix(c( + "expressionmatrix", "e", 1, "character", + "transformedmatrix", "t", 1, "character" + ), byrow=TRUE, ncol=4) +opt <- getopt(spec) + +em <- read.delim(opt$expressionmatrix,header=T,row.names=1,stringsAsFactors=F,check.names=FALSE,na.strings=c("")) + +vem <- voom(em) +write.table(file=opt$transformedmatrix,vem$E,sep="\t",row.names=TRUE,col.names=NA,quote=F)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/voom_transform.xml Wed Jan 25 10:13:10 2017 -0500 @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tool id="voom_transform" name="Voom transform" version="3.29.0-0"> + <description>transform count data to fit linear modelling</description> + <requirements> + <requirement type="package" version="3.29.0">bioconductor-limma</requirement> + <requirement type="package" version="1.20.0">r-getopt</requirement> + </requirements> + + <version_command>echo $(R --version | grep -i version | head -n 1)", Limma: "$(R --vanilla --slave -e "library(limma) ; cat(sessionInfo()\$otherPkgs\$limma\$Version)")</version_command> + + <command detect_errors="exit_code"><![CDATA[ + Rscript + #if str($include_rdata) == 'true' + --save + #end if + '${__tool_directory__}/voom_transform.R' + -e '${input_select.expression_matrix}' + -t '${output_matrix}' + + #if str($include_rdata) == 'true' + && cp '.RData' '$output_rdata' + #end if + + ]]></command> + + <inputs> + <conditional name="input_select"> + <param name="input_format" type="select" label="Output format"> + <option value="1">Single expression matrix (header + multi column)</option> + <!-- <option value="2">Count files (no header + 1 sample per file)</option>--> + </param> + + <when value="1"> + <param name="expression_matrix" type="data" format="txt,tabular" /> + </when> + <!-- + <when value="2"> + repeat / input type = multiple + </when> + --> + </conditional> + + <param name="include_rdata" type="boolean" truevalue="true" falsevalue="" label="Save RData object" /> + + <!-- normalization param + --> + + </inputs> + + <outputs> + <data name="output_matrix" format="tabular" + label="${tool.name} on $on_string" /> + + <data name="output_rdata" format="RData" label="${tool.name} on $on_string (RData)"> + <filter>str(include_rdata) in ['true', true]</filter> + </data> + </outputs> + + <tests> + <test> + <param name="input_format" value="1" /> + <param name="expression_matrix" value="em.txt" /> + + <output name="output_matrix" value="em_transformed.txt" /> + </test> + </tests> + + <help><![CDATA[ + + ]]></help> + + <citations> + <citation type="doi">10.1093/nar/gkv007</citation> + </citations> +</tool>