changeset 19:8938f339ed37 draft

Added output of pdf report with distributions
author geert-vandeweyer
date Mon, 29 Sep 2014 05:19:48 -0400
parents 93f4d7524823
children 8262299f8f3c
files DC_Genotyper.pl DC_Genotyper.xml
diffstat 2 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/DC_Genotyper.pl	Mon Sep 29 04:00:18 2014 -0400
+++ b/DC_Genotyper.pl	Mon Sep 29 05:19:48 2014 -0400
@@ -298,20 +298,20 @@
 print OUT "par(mfrow=c(2, 2))\n";
 print OUT "for (i in 1:nrow(dists)) {\n";
 print OUT "   if (dists[i,'avg'] > 0.5) {\n";
-print OUT "     x <- seq(0.85,1,length=1000))\n";
-print OUT "     y <- dnorm(x,mean=dists[i,'avg'],sd=dists[i,'sd']))\n";
-print OUT "     plot(x,y,main=paste('Distribution for allele \"',dists[i,'allele'],'\"',sep=''),xlab='Allelic Ratio',type='l',lwd=1))\n";
-print OUT "     abline(v=(dists[i,'avg']-3*dists[i,'sd']),col='red'))\n";
-print OUT "     text(0.855,max(y-0.5),paste(c('avg: ',round(dists[i,'avg'],digits=5),'\\nsd: ',round(dists[i,'sd'],digits=5),'\\nN: ',dists[i,'N']),sep=' ',collapse=''),adj=c(0,1)))\n";
-print OUT "  } else {)\n";
-print OUT "   x <- seq(0,0.15,length=1000))\n";
-print OUT "   y <- dnorm(x,dists[i,'avg'],sd=dists[i,'sd']))\n";
-print OUT "   plot(x,y,main=paste('Distribution for \"',dists[i,'allele'],'\" variation',sep=''),xlab='Allelic Ratio',type='l',lwd=1))\n";
-print OUT "   abline(v=(dists[i,'avg']+3*dists[i,'sd']),col='red'))\n";
-print OUT "   text(0.1,max(y-0.5),paste(c('avg: ',round(dists[i,'avg'],digits=5),'\\nsd: ',round(dists[i,'sd'],digits=5),'\\nN: ',dists[i,'N']),sep=' ',collapse=''),adj=c(0,1)))\n";
-print OUT "  })\n";
-print OUT "})\n";
-print OUT "dev.off())\n";
+print OUT "     x <- seq(0.85,1,length=1000)\n";
+print OUT "     y <- dnorm(x,mean=dists[i,'avg'],sd=dists[i,'sd'])\n";
+print OUT "     plot(x,y,main=paste('Distribution for allele \"',dists[i,'allele'],'\"',sep=''),xlab='Allelic Ratio',type='l',lwd=1)\n";
+print OUT "     abline(v=(dists[i,'avg']-3*dists[i,'sd']),col='red')\n";
+print OUT "     text(0.855,max(y-0.5),paste(c('avg: ',round(dists[i,'avg'],digits=5),'\\nsd: ',round(dists[i,'sd'],digits=5),'\\nN: ',dists[i,'N']),sep=' ',collapse=''),adj=c(0,1))\n";
+print OUT "  } else {\n";
+print OUT "   x <- seq(0,0.15,length=1000)\n";
+print OUT "   y <- dnorm(x,dists[i,'avg'],sd=dists[i,'sd'])\n";
+print OUT "   plot(x,y,main=paste('Distribution for \"',dists[i,'allele'],'\" variation',sep=''),xlab='Allelic Ratio',type='l',lwd=1)\n";
+print OUT "   abline(v=(dists[i,'avg']+3*dists[i,'sd']),col='red')\n";
+print OUT "   text(0.1,max(y-0.5),paste(c('avg: ',round(dists[i,'avg'],digits=5),'\\nsd: ',round(dists[i,'sd'],digits=5),'\\nN: ',dists[i,'N']),sep=' ',collapse=''),adj=c(0,1))\n";
+print OUT "  }\n";
+print OUT "}\n";
+print OUT "dev.off()\n";
 close OUT;
 system("cd $wd && Rscript MakePlots.R > /dev/null 2>&1");
 
@@ -474,7 +474,7 @@
 		}
 		## get counts.
 		my $target = "$chr:$start-$stop";
-		my $command = "igvtools count -w 1 --bases --query '$target' '$bam' '$wd/WIGS/$chr-$start-$stop.wig' '$igvgenome' > /dev/null 2>&1";
+		my $command = "igvtools count -w 1 --bases --query '$target' '$wd/input.bam' '$wd/WIGS/$chr-$start-$stop.wig' '$igvgenome' > /dev/null 2>&1";
 		system($command);
 		open WIG, "$wd/WIGS/$chr-$start-$stop.wig";
 		my $h = <WIG>;
--- a/DC_Genotyper.xml	Mon Sep 29 04:00:18 2014 -0400
+++ b/DC_Genotyper.xml	Mon Sep 29 05:19:48 2014 -0400
@@ -60,7 +60,7 @@
 	
 	<outputs>
 		<data format='txt' name="output1" label="${tool.name} on ${on_string}: Allele Fraction Distributions (TXT)"/>
-		<data format='pdf' name="output3" lable="${tool.name} on ${on_string}: Allele Fraction Distributions (PDF)"/>
+		<data format='pdf' name="output3" label="${tool.name} on ${on_string}: Allele Fraction Distributions (PDF)"/>
 		<data format='vcf' name='output2' label="${tool.name} on ${on_string}: VCF file" />
 	</outputs>
 <help>