Checking the realpath of input files. 0 isoforms.count_table.0.20.txt 0 sample.input.0.20.txt 0 input_3/Trinotate.xls3.isoform.cnt script: /yoshitake/PortablePipeline/PortablePipeline/scripts/statistics~DESeq2 "$scriptdir"/statistics~scatter_with_variance c2997108/centos6:3 c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 centos:centos6 using docker + set -o pipefail + script=run-DESeq2.0.20.isoform.R + inputsamplematrix=sample.input.0.20.txt + inputmatrix=isoforms.count_table.0.20.txt + g1=0 + g2=20 + '[' 0 = '' ']' + '[' 20 = '' ']' + p=0.05 ++ basename isoforms.count_table.0.20.txt + outputfile=DESeq2.isoforms.count_table.0.20.txt ++ basename sample.input.0.20.txt ++ basename isoforms.count_table.0.20.txt + samplex=DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.x ++ basename sample.input.0.20.txt ++ basename isoforms.count_table.0.20.txt + sampley=DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.y ++ basename isoforms.count_table.0.20.txt + outputfilexup=result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt ++ basename isoforms.count_table.0.20.txt + outputfileyup=result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt + '[' input_3/Trinotate.xls3.isoform.cnt = '' ']' + annotationfile=input_3/Trinotate.xls3.isoform.cnt + cat ++ date +%Y%m%d_%H%M%S_%3N + PPDOCNAME=pp20220928_194915_924_5717 + echo pp20220928_194915_924_5717 + docker run --name pp20220928_194915_924_5717 -v /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR:/yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -w /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -u 2007:600 -i --rm c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 R --vanilla R version 3.5.2 (2018-12-20) -- "Eggshell Igloo" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(DESeq2) Loading required package: S4Vectors Loading required package: stats4 Loading required package: BiocGenerics Loading required package: parallel Attaching package: 'BiocGenerics' The following objects are masked from 'package:parallel': clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB The following objects are masked from 'package:stats': IQR, mad, sd, var, xtabs The following objects are masked from 'package:base': Filter, Find, Map, Position, Reduce, anyDuplicated, append, as.data.frame, basename, cbind, colMeans, colSums, colnames, dirname, do.call, duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which, which.max, which.min Attaching package: 'S4Vectors' The following object is masked from 'package:base': expand.grid Loading required package: IRanges Loading required package: GenomicRanges Loading required package: GenomeInfoDb Loading required package: SummarizedExperiment Loading required package: Biobase Welcome to Bioconductor Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for packages 'citation("pkgname")'. Loading required package: DelayedArray Loading required package: matrixStats Attaching package: 'matrixStats' The following objects are masked from 'package:Biobase': anyMissing, rowMedians Loading required package: BiocParallel Attaching package: 'DelayedArray' The following objects are masked from 'package:matrixStats': colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges The following objects are masked from 'package:base': aperm, apply > colData <- read.table("sample.input.0.20.txt", header=T, row.names=1, sep="\t") > countData=round(read.table("isoforms.count_table.0.20.txt",sep="\t",header=T,row.names=1)) > mydata=data.frame("group"=as.character(colData[,1]),stringsAsFactors=F) > dds <- DESeqDataSetFromMatrix(countData = countData, colData = mydata, design = ~ group) converting counts to integer mode Warning message: In DESeqDataSet(se, design = design, ignoreRank) : some variables in design formula are characters, converting to factors > dds <- DESeq(dds) estimating size factors estimating dispersions gene-wise dispersion estimates mean-dispersion relationship final dispersion estimates fitting model and testing > rld <- rlog(dds, blind=FALSE) > resMLE <- results(dds, alpha=0.05, contrast=c("group","0","20")) > a=(resMLE$padj<0.05) > a[is.na(a)]=FALSE > write.table(as.data.frame(resMLE[a,]),file="DESeq2.isoforms.count_table.0.20.txt",quote=F,sep="\t") > + '[' '!' -e DESeq2.isoforms.count_table.0.20.txt ']' + tail -n+2 DESeq2.isoforms.count_table.0.20.txt + cut -f 1 + awk '-F\t' -v g1=0 '$2==g1{print $1}' sample.input.0.20.txt + awk '-F\t' -v g2=20 '$2==g2{print $1}' sample.input.0.20.txt + bash /yoshitake/PortablePipeline/PortablePipeline/scripts/statistics~scatter_with_variance -x 0 -y 20 isoforms.count_table.0.20.txt DESeq2.isoforms.count_table.0.20.txt.id DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.x DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.y Checking the realpath of input files. 0 isoforms.count_table.0.20.txt 0 DESeq2.isoforms.count_table.0.20.txt.id 0 DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.x 0 DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.y c2997108/centos6:3 c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 centos:centos6 using docker + set -o pipefail + countmat=isoforms.count_table.0.20.txt + sigmat=DESeq2.isoforms.count_table.0.20.txt.id + listx=DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.x + listy=DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.y + label_x=0 + label_y=20 + p=0.05 ++ basename isoforms.count_table.0.20.txt ++ basename DESeq2.isoforms.count_table.0.20.txt.id + output=isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id + cat isoforms.count_table.0.20.txt + awk '-F\t' 'FILENAME==ARGV[1]{if(FNR>1){for(i=2;i<=NF;i++){a[i]+=$i}}} FILENAME==ARGV[2]{if(FNR==1){print $0}else{ORS=""; print $1;for(i=2;i<=NF;i++){print "\t"$i/a[i]*1000*1000}; print "\n"}}' /dev/stdin isoforms.count_table.0.20.txt + cat DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.x + awk '-F\t' 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2]{if(FNR==1){for(i=1;i<=NF;i++){if(a[$i]==1){b[i]=1}}}; ORS=""; print $1; for(i=2;i<=NF;i++){if(b[i]==1){print "\t"$i}}; print "\n"}' /dev/stdin isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm + cat DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.y + awk '-F\t' 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2]{if(FNR==1){for(i=1;i<=NF;i++){if(a[$i]==1){b[i]=1}}}; ORS=""; print $1; for(i=2;i<=NF;i++){if(b[i]==1){print "\t"$i}}; print "\n"}' /dev/stdin isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm + cat DESeq2.isoforms.count_table.0.20.txt.id + awk '-F\t' 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2] && (FNR==1 || a[$1]==1){print $0}' /dev/stdin isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_x + cat DESeq2.isoforms.count_table.0.20.txt.id + awk '-F\t' 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2] && (FNR==1 || a[$1]==1){print $0}' /dev/stdin isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_y + cat ++ date +%Y%m%d_%H%M%S_%3N + PPDOCNAME=pp20220928_213525_600_2363 + echo pp20220928_213525_600_2363 + docker run --name pp20220928_213525_600_2363 -v /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR:/yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -w /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -u 2007:600 -i --rm c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 R --vanilla R version 3.5.2 (2018-12-20) -- "Eggshell Igloo" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > label_x="0" > label_y="20" > file_data_x="isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_x" > file_data_y="isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_y" > file_sig_data_x="isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_x_sig" > file_sig_data_y="isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_y_sig" > data_x=round(read.table(file_data_x,sep="\t",header=T,row.names=1)) > data_y=round(read.table(file_data_y,sep="\t",header=T,row.names=1)) > sig_data_x=read.table(file_sig_data_x,sep="\t",header=T,row.names=1) > if(dim(sig_data_x)[1]!=0){sig_data_x=round(sig_data_x)} > sig_data_y=read.table(file_sig_data_y,sep="\t",header=T,row.names=1) > if(dim(sig_data_y)[1]!=0){sig_data_y=round(sig_data_y)} > mean_data_x=apply(data_x,1,mean) > mean_data_y=apply(data_y,1,mean) > if(dim(data_x)[2]>1){ + dx=apply(data_x,1,function(i){return(abs(qt(0.05/2, length(i)-1)) * sd(i) / sqrt(length(i)))}) + }else{ + dx=0 + } > if(dim(data_y)[2]>1){ + dy=apply(data_y,1,function(i){return(abs(qt(0.05/2, length(i)-1)) * sd(i) / sqrt(length(i)))}) + }else{ + dy=0 + } > vx=dx/mean_data_x > vy=dy/mean_data_y > vx[is.na(vx)]=0 > vy[is.na(vy)]=0 > #total_var_data=sqrt(dx^2+dy^2)/sqrt(mean_data_x^2+mean_data_y^2) > #total_var_data[is.na(total_var_data)]=0 > total_var_data=sqrt(vx^2+vy^2) > mean_sig_data_x=apply(sig_data_x,1,mean) > mean_sig_data_y=apply(sig_data_y,1,mean) > min_x=min(mean_data_x[mean_data_x>0])/10 > min_y=min(mean_data_y[mean_data_y>0])/10 > plot_mean_data_x=mean_data_x+min_x > plot_mean_data_y=mean_data_y+min_y > plot_mean_sig_data_x=mean_sig_data_x+min_x > plot_mean_sig_data_y=mean_sig_data_y+min_y > max_x=max(plot_mean_data_x) > max_y=max(plot_mean_data_y) > library(Cairo) > mainplotfunc=function(){ + if(max(dx,dy)>0){ + start_class=quantile(total_var_data[total_var_data>0],c(0,1,25,50,75,90,100)/100)[2] + end_class=quantile(total_var_data[total_var_data>0],c(0,1,25,50,75,90,100)/100)[6] + + CairoPNG("isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.scatter.png",width=800,height=600) + num_class=22 + library(RColorBrewer) + #mycol=colorRampPalette(c(rgb(0.5,0,0.2,0.4),rgb(1,0.8,0.7,1)), alpha=TRUE)(num_class) + colPal3 <- colorRampPalette(brewer.pal(9,"YlOrRd")[3:9]) + mycol=colPal3(num_class) + + layout(matrix(c(1,1,1,1,2),1,5)) + par(ps = 18) + k=0 + i=end_class + n=(total_var_data>=i) + xt=plot_mean_data_x[n] + yt=plot_mean_data_y[n] + plot(xt,yt,log="xy",xlim=c(min_x,max_x),ylim=c(min_y,max_y),cex=2*(k+1)^3/num_class^3,pch=21,col=adjustcolor(mycol[k+1],0),bg=adjustcolor(mycol[k+1],1-0.4*k/num_class),xlab=label_x,ylab=label_y) + + for(k in 1:(num_class-2)){ + i=end_class+(start_class-end_class)*k/(num_class-2) + n=(total_var_data>=i & total_var_data=i & total_var_data=",i),pos=4) + } + k=num_class-1 + i=min(total_var_data) + par(new=T) + plot(c(0),c(k),xlim=c(0,0),ylim=c(-1,num_class),col=adjustcolor(mycol[k+1],0),bg=adjustcolor(mycol[k+1],1-0.4*k/num_class),pch=21,cex=2*(k+1)^3/num_class^3,bty="n",axes=F,xlab="",ylab="") + text(c(0.05),c(k),paste(">=",i),pos=4) + text(0,num_class+0.2,"95%conf/mean") + par(new=T) + plot(c(-0.3),c(-1),xlim=c(0,0),ylim=c(-1,num_class),col="green",cex=1,bty="n",axes=F,xlab="",ylab="") + text(c(-0.3),c(-1),paste("significant"),pos=4) + + dev.off() + } + } > subplotfunc=function(){ + CairoPNG("isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.scatter.normal.png",width=600,height=600) + plot(plot_mean_data_x,plot_mean_data_y,log="xy",xlim=c(min_x,max_x),ylim=c(min_y,max_y),cex=0.1,pch=21,col=adjustcolor("#000000",0.5),xlab=label_x,ylab=label_y) + par(new=T) + plot(plot_mean_sig_data_x,plot_mean_sig_data_y,log="xy",xlim=c(min_x,max_x),ylim=c(min_y,max_y),col="green",cex=2,axes=F,xlab="",ylab="") + dev.off() + } > > wflag=0 > while(wflag<=5){ + restry=NULL + restry=try(mainplotfunc(), silent = FALSE) + if(class(restry)!="try-error"){break} + try(dev.off()) + Sys.sleep(10+runif(1, min=0,max=100)/10) + wflag=wflag+1 + } > wflag=0 > while(wflag<=5){ + restry=NULL + restry=try(subplotfunc(), silent = FALSE) + if(class(restry)!="try-error"){break} + try(dev.off()) + Sys.sleep(10+runif(1, min=0,max=100)/10) + wflag=wflag+1 + } > > > + rm -f isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_x isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_y isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_x_sig isoforms.count_table.0.20.txt.DESeq2.isoforms.count_table.0.20.txt.id.cpm_y_sig + post_processing + '[' 3 = 1 ']' + exit + tail -n+2 DESeq2.isoforms.count_table.0.20.txt + awk '{if($3>=0){print $1"\tx"}else{print $1"\ty"}}' + awk '-F\t' 'NR==1{print "id\t"$0} NR>1{print $0}' DESeq2.isoforms.count_table.0.20.txt + cut -f 1,7 + cut -f 2- + sort -k1,1g + awk '-F\t' 'NR==1{print -1"\t"$0} NR>1{print $2"\t"$0}' + awk '-F\t' 'FILENAME==ARGV[1]{xy[$1]=$2} FILENAME==ARGV[2]{if(FNR==1){header=$0}; res[$1]=$0} FILENAME==ARGV[3]{if(FNR==1){print header"\t"$2}else{if(xy[$1]=="x"){print res[$1]"\t"$2}}}' DESeq2.isoforms.count_table.0.20.txt.xy input_3/Trinotate.xls3.isoform.cnt DESeq2.isoforms.count_table.0.20.txt.p + awk '-F\t' 'FILENAME==ARGV[1]{xy[$1]=$2} FILENAME==ARGV[2]{if(FNR==1){header=$0}; res[$1]=$0} FILENAME==ARGV[3]{if(FNR==1){print header"\t"$2}else{if(xy[$1]=="y"){print res[$1]"\t"$2}}}' DESeq2.isoforms.count_table.0.20.txt.xy input_3/Trinotate.xls3.isoform.cnt DESeq2.isoforms.count_table.0.20.txt.p + i=result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt + awk '-F\t' -v maxlen=30000 'FILENAME==ARGV[1]{for(i=1;i<=NF;i++){n=int((length($i)-1)/maxlen)+1; if(n>a[i]){a[i]=n}}} FILENAME==ARGV[2]{if(FNR==1){ORS=""; for(i=1;i<=NF;i++){if(a[i]<=1){print $i"\t"}else{for(j=1;j<=a[i];j++){print $i" (split "j")\t"}}}; print "\n"}else{for(i=1;i<=NF;i++){if(a[i]<=1){print $i"\t"}else{for(j=1;j<=a[i];j++){print substr($i,(j-1)*maxlen+1,maxlen)"\t" }}}; print "\n"}}' result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt ./result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt + sed 's/\t$//' + i=result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt + sed 's/\t$//' + awk '-F\t' -v maxlen=30000 'FILENAME==ARGV[1]{for(i=1;i<=NF;i++){n=int((length($i)-1)/maxlen)+1; if(n>a[i]){a[i]=n}}} FILENAME==ARGV[2]{if(FNR==1){ORS=""; for(i=1;i<=NF;i++){if(a[i]<=1){print $i"\t"}else{for(j=1;j<=a[i];j++){print $i" (split "j")\t"}}}; print "\n"}else{for(i=1;i<=NF;i++){if(a[i]<=1){print $i"\t"}else{for(j=1;j<=a[i];j++){print substr($i,(j-1)*maxlen+1,maxlen)"\t" }}}; print "\n"}}' result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt ./result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt ++ date +%Y%m%d_%H%M%S_%3N + PPDOCNAME=pp20220928_214058_246_13814 + echo pp20220928_214058_246_13814 + docker run --name pp20220928_214058_246_13814 -v /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR:/yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -w /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -u 2007:600 -i --rm c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 java -Xmx1G -jar /usr/local/bin/excel2.jar result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt.temp result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt.xlsx Start converting ++ date +%Y%m%d_%H%M%S_%3N + PPDOCNAME=pp20220928_214101_980_18998 + echo pp20220928_214101_980_18998 + docker run --name pp20220928_214101_980_18998 -v /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR:/yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -w /yoshitake/test/statistics~all-sample-combinations-DESeq2-edgeR -u 2007:600 -i --rm c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 java -Xmx1G -jar /usr/local/bin/excel2.jar result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt.temp result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt.xlsx Start converting + rm -f DESeq2.isoforms.count_table.0.20.txt.id DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.x DESeq2.sample.input.0.20.txt.isoforms.count_table.0.20.txt.y DESeq2.isoforms.count_table.0.20.txt.xy DESeq2.isoforms.count_table.0.20.txt.p result.DESeq2.isoforms.count_table.0.20.txt.0.up.20.down.txt.temp result.DESeq2.isoforms.count_table.0.20.txt.0.down.20.up.txt.temp + post_processing + '[' 2 = 1 ']' + exit