galaxy-dist commit dcc68da403f0: Fix for failing rgManQQ functional test - changed R outputs. cut down size of default png - much faster...
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Ross Lazarus <ross.lazarus@gmail.com> # Date 1289178885 18000 # Node ID dcc68da403f0e8d3ae0da07529ff96327ca05489 # Parent 74620fac33c74b60c0a2faa69364dea0115e8815 Fix for failing rgManQQ functional test - changed R outputs. cut down size of default png - much faster... Binary file test-data/rgtestouts/rgManQQ/Allelep_manhattan.png has changed --- a/tools/rgenetics/rgManQQ.py +++ b/tools/rgenetics/rgManQQ.py @@ -6,6 +6,7 @@ from rgutils import timenow, RRun, galht progname = os.path.split(sys.argv[0])[1] myversion = 'V000.1 March 2010' verbose = False +debug = False rcode=""" # license not stated so I'm assuming LGPL is ok for my derived work? @@ -156,7 +157,7 @@ if (plen > 0) { mytitle = paste('p=',cname,', ',title,sep='') myfname = chartr(' ','_',cname) myqqplot = qq(rawd[,pvalscolumn],title=mytitle) - ggsave(filename=paste(myfname,"qqplot.png",sep='_'),myqqplot,width=11,height=8,dpi=100) + ggsave(filename=paste(myfname,"qqplot.png",sep='_'),myqqplot,width=6,height=4,dpi=100) print(paste('## qqplot on',cname,'done')) if ((chromcolumn > 0) & (offsetcolumn > 0)) { if (doreorder) { @@ -168,7 +169,7 @@ if (plen > 0) { print(paste('## manhattan on',cname,'starting',chromcolumn,offsetcolumn,pvalscolumn)) mymanplot= manhattan(chrom=rawd[,chromcolumn],offset=rawd[,offsetcolumn],pvals=rawd[,pvalscolumn],title=mytitle,grey=grey) print(paste('## manhattan plot on',cname,'done')) - ggsave(filename=paste(myfname,"manhattan.png",sep='_'),mymanplot,width=11,height=8,dpi=100) + ggsave(filename=paste(myfname,"manhattan.png",sep='_'),mymanplot,width=6,height=4,dpi=100) } else { print(paste('chrom column =',chromcolumn,'offset column = ',offsetcolumn, @@ -196,6 +197,8 @@ def doManQQ(input_fname,chrom_col,offset to make them do our bidding - and save the resulting code for posterity this can be called externally, I guess...for QC eg? """ + if debug: + print 'doManQQ',input_fname,chrom_col,offset_col,pval_cols,title,grey,ctitle,outdir ffd,filtered_fname = tempfile.mkstemp(prefix='rgManQQtemp') f = open(filtered_fname,'w') inf = open(input_fname,'r') @@ -232,6 +235,8 @@ def doManQQ(input_fname,chrom_col,offset pvc = [x+3 for x in range(len(pval_cols))] # 2 for offset and chrom, 1 for r offset start pvc = 'c(%s)' % (','.join(map(str,pvc))) rcmd = '%s%s' % (rcode,rcode2 % (filtered_fname,'1','2',pvc,title,grey)) + if debug: + print 'running\n%s\n' % rcmd rlog,flist = RRun(rcmd=rcmd,title=ctitle,outdir=outdir) rlog.append('## R script=') rlog.append(rcmd) --- a/test-data/rgtestouts/rgManQQ/rgManQQtest1.R +++ b/test-data/rgtestouts/rgManQQ/rgManQQtest1.R @@ -124,7 +124,7 @@ qq = function(pvector, title=NULL, spart if (spartan) plot=plot+opts(panel.background=theme_rect(col="grey50"), panel.grid.minor=theme_blank()) qq } -rgqqMan = function(infile="/tmp/rgManQQtempcWfFkc",chromcolumn=1, offsetcolumn=2, pvalscolumns=c(3), +rgqqMan = function(infile="/tmp/rgManQQtemplYC5wa",chromcolumn=1, offsetcolumn=2, pvalscolumns=c(3), title="rgManQQtest1",grey=0) { rawd = read.table(infile,head=T,sep='\t') dn = names(rawd) @@ -142,7 +142,7 @@ if (plen > 0) { mytitle = paste('p=',cname,', ',title,sep='') myfname = chartr(' ','_',cname) myqqplot = qq(rawd[,pvalscolumn],title=mytitle) - ggsave(filename=paste(myfname,"qqplot.png",sep='_'),myqqplot,width=11,height=8,dpi=100) + ggsave(filename=paste(myfname,"qqplot.png",sep='_'),myqqplot,width=6,height=4,dpi=100) print(paste('## qqplot on',cname,'done')) if ((chromcolumn > 0) & (offsetcolumn > 0)) { if (doreorder) { @@ -154,7 +154,7 @@ if (plen > 0) { print(paste('## manhattan on',cname,'starting',chromcolumn,offsetcolumn,pvalscolumn)) mymanplot= manhattan(chrom=rawd[,chromcolumn],offset=rawd[,offsetcolumn],pvals=rawd[,pvalscolumn],title=mytitle,grey=grey) print(paste('## manhattan plot on',cname,'done')) - ggsave(filename=paste(myfname,"manhattan.png",sep='_'),mymanplot,width=11,height=8,dpi=100) + ggsave(filename=paste(myfname,"manhattan.png",sep='_'),mymanplot,width=6,height=4,dpi=100) } else { print(paste('chrom column =',chromcolumn,'offset column = ',offsetcolumn, @@ -171,4 +171,4 @@ if (plen > 0) { rgqqMan() # execute with defaults as substituted -#R script autogenerated by rgenetics/rgutils.py on 18/09/2010 20:46:49 +#R script autogenerated by rgenetics/rgutils.py on 07/11/2010 20:03:37 --- a/test-data/rgtestouts/rgManQQ/rgManQQtest1.html +++ b/test-data/rgtestouts/rgManQQ/rgManQQtest1.html @@ -43,7 +43,7 @@ Loading required package: grid Loading required package: proto -[1] "### 101 values read from /tmp/rgManQQtempcWfFkc read - now running plots" +[1] "### 101 values read from /tmp/rgManQQtemplYC5wa read - now running plots" [1] "## qqplot on Allelep done" @@ -178,7 +178,7 @@ qq = function(pvector, title=NULL, spart if (spartan) plot=plot+opts(panel.background=theme_rect(col="grey50"), panel.grid.minor=theme_blank()) qq } -rgqqMan = function(infile="/tmp/rgManQQtempcWfFkc",chromcolumn=1, offsetcolumn=2, pvalscolumns=c(3), +rgqqMan = function(infile="/tmp/rgManQQtemplYC5wa",chromcolumn=1, offsetcolumn=2, pvalscolumns=c(3), title="rgManQQtest1",grey=0) { rawd = read.table(infile,head=T,sep='\t') dn = names(rawd) @@ -196,7 +196,7 @@ if (plen > 0) { mytitle = paste('p=',cname,', ',title,sep='') myfname = chartr(' ','_',cname) myqqplot = qq(rawd[,pvalscolumn],title=mytitle) - ggsave(filename=paste(myfname,"qqplot.png",sep='_'),myqqplot,width=11,height=8,dpi=100) + ggsave(filename=paste(myfname,"qqplot.png",sep='_'),myqqplot,width=6,height=4,dpi=100) print(paste('## qqplot on',cname,'done')) if ((chromcolumn > 0) & (offsetcolumn > 0)) { if (doreorder) { @@ -208,7 +208,7 @@ if (plen > 0) { print(paste('## manhattan on',cname,'starting',chromcolumn,offsetcolumn,pvalscolumn)) mymanplot= manhattan(chrom=rawd[,chromcolumn],offset=rawd[,offsetcolumn],pvals=rawd[,pvalscolumn],title=mytitle,grey=grey) print(paste('## manhattan plot on',cname,'done')) - ggsave(filename=paste(myfname,"manhattan.png",sep='_'),mymanplot,width=11,height=8,dpi=100) + ggsave(filename=paste(myfname,"manhattan.png",sep='_'),mymanplot,width=6,height=4,dpi=100) } else { print(paste('chrom column =',chromcolumn,'offset column = ',offsetcolumn, @@ -227,6 +227,6 @@ rgqqMan() </pre> -<h3><a href="http://rgenetics.org">Rgenetics</a> tool rgManQQ.py run at 18/09/2010 20:48:26</h3> +<h3><a href="http://rgenetics.org">Rgenetics</a> tool rgManQQ.py run at 07/11/2010 20:04:20</h3></div></body></html> --- a/tools/rgenetics/rgManQQ.xml +++ b/tools/rgenetics/rgManQQ.xml @@ -42,7 +42,7 @@ <param name='chrom_col' value='1' /><param name='offset_col' value='2' /><param name='grey' value='0' /> - <output name='out_html' file='rgtestouts/rgManQQ/rgManQQtest1.html' ftype='html' lines_diff='40'> + <output name='out_html' file='rgtestouts/rgManQQ/rgManQQtest1.html' ftype='html' lines_diff='60'><extra_files type="file" name='Allelep_manhattan.png' value='rgtestouts/rgManQQ/Allelep_manhattan.png' compare="sim_size" delta = "10000"/><extra_files type="file" name='Allelep_qqplot.png' value='rgtestouts/rgManQQ/Allelep_qqplot.png' compare="sim_size" Binary file test-data/rgtestouts/rgManQQ/Allelep_qqplot.png has changed
participants (1)
-
commits-noreply@bitbucket.org