annotate phyloseq_2_deseq2.r @ 3:7e24242ffa65 draft default tip

"planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit d0640fad8d76a76d363ff687dfd4aeef96fd3af0"
author qfabrepo
date Fri, 24 Sep 2021 04:16:51 +0000
parents 1f0569e94be4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
1 library('getopt')
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
2 suppressPackageStartupMessages(library('phyloseq'))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
3 suppressPackageStartupMessages(library('DESeq2'))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
4
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
5 options(warn= -1)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
6
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
7 option_specification = matrix(c(
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
8 'biomfile','b',2,'character',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
9 'metafile','m',2,'character',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
10 'factor','f',2,'numeric',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
11 'test','t',2,'character',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
12 'fitType','T',2,'character',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
13 'cutoff','c','2','double',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
14 'outdir','o',2,'character',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
15 'result','r',2,'character',
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
16 'normalisedResult','n','2','character'
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
17 ),byrow=TRUE,ncol=4);
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
18
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
19
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
20 options <- getopt(option_specification);
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
21 options(bitmapType="cairo")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
22
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
23
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
24 if (!is.null(options$outdir)) {
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
25 # Create the directory
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
26 dir.create(options$outdir,FALSE)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
27 }
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
28
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
29
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
30 galaxy_biom <- import_biom(options$biomfile)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
31 galaxy_map <- import_qiime_sample_data(options$metafile)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
32 tax_col_norm <- c("Kingdom","Phylum","Class","Order","Family","Genus","Species")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
33 tax_col_extra <- c("None","Kingdom","Phylum","Class","Order","Family","Genus","Species")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
34
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
35 number.of.tax.rank<-length(colnames(tax_table(galaxy_biom)))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
36
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
37 if( number.of.tax.rank == 7){
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
38 colnames(tax_table(galaxy_biom)) <- tax_col_norm
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
39 }else{
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
40 colnames(tax_table(galaxy_biom)) <- tax_col_extra
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
41 }
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
42
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
43
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
44 AIP_galaxy <- merge_phyloseq(galaxy_biom,galaxy_map)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
45
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
46
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
47 Infactor<-colnames(galaxy_map)[options$factor]
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
48 method<-options$test
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
49 Type<-options$fitType
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
50 cutoff<-options$cutoff
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
51
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
52
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
53
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
54 suppressMessages(deseq2_obj<-phyloseq_to_deseq2(AIP_galaxy,as.formula(paste('~',Infactor,sep=""))))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
55 gm_mean = function(x, na.rm=TRUE){
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
56 exp(sum(log(x[x > 0]), na.rm=na.rm) / length(x))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
57 }
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
58 geoMeans = apply(counts(deseq2_obj), 1, gm_mean)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
59 deseq2_obj = estimateSizeFactors(deseq2_obj, geoMeans = geoMeans)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
60
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
61
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
62
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
63 ### Normalisation
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
64 deseq2_obj_norm<-counts(deseq2_obj,normalized=T)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
65 deseq2_obj_norm.out<-as.data.frame(cbind("OTUID"=rownames(deseq2_obj_norm),deseq2_obj_norm))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
66 write.table(deseq2_obj_norm.out,file=options$normalisedResult,col.names=T,row.names=F,quote=F,sep="\t")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
67
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
68
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
69 ### Normalisation and DE analysis
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
70 suppressMessages(deseq2_obj_DE<-DESeq(deseq2_obj,test=method,fitType=Type))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
71 res = results(deseq2_obj_DE,cooksCutoff = FALSE)
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
72
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
73 significant.table <-res[which(res$padj < cutoff),]
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
74
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
75 if(nrow(significant.table) == 0){
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
76 out_message <-"no significant result found!"
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
77 write(out_message,file=options$result,sep="\t")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
78 quit("yes")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
79 }
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
80
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
81 significant.table <- cbind(as(significant.table,"data.frame"), as(tax_table(AIP_galaxy)[rownames(significant.table),],"matrix"))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
82
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
83 significant.table.out<-as.data.frame(cbind("OTUID"=rownames(significant.table),significant.table))
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
84
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
85 write.table(format(significant.table.out, digits=4, scientific=F),file=options$result,col.names=T,row.names=F,quote=F,sep="\t")
1f0569e94be4 "planemo upload for repository https://github.com/QFAB-Bioinformatics/metaDEGalaxy/tree/master/phyloseq_2_deseq2 commit 8bd68662b72404f6291e9628327dcb109b5fa55e"
qfabrepo
parents:
diff changeset
86