annotate voom_transform.R @ 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
1 #!/usr/bin/env Rscript
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
2
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
3 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
4 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
5
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
6 library("getopt")
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
7 library("limma")
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
8
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
9 spec <- matrix(c(
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
10 "expressionmatrix", "e", 1, "character",
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
11 "transformedmatrix", "t", 1, "character"
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
12 ), byrow=TRUE, ncol=4)
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
13 opt <- getopt(spec)
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
14
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
15 em <- read.delim(opt$expressionmatrix,header=T,row.names=1,stringsAsFactors=F,check.names=FALSE,na.strings=c(""))
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
16
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
17 vem <- voom(em)
c6a3a93a237e planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/voom_transform commit e7e72828395347db6ba45ad6b927cd551b5e9327
erasmus-medical-center
parents:
diff changeset
18 write.table(file=opt$transformedmatrix,vem$E,sep="\t",row.names=TRUE,col.names=NA,quote=F)