Hi Xiao,

the attached ones are working for me, hope for you too.

Cheers,
Bjoern

> Dear Bjorn
> 
> 
> The configure xml file and the relevant R scripts is attached. 
> 
> 
> Thank you for all your help.
> 
> 
> Regards,
> XiaoTao
> The University of HongKong
> 
> 
> 2013/9/3 Björn Grüning <bjoern.gruen...@pharmazie.uni-freiburg.de>
>         Hi Xiao,
>         
>         can you show us the complete wrapper XML script?
>         
>         Thanks,
>         Bjoern
>         
>         >
>         >
>         > ---------- Forwarded message ----------
>         > From: XiaoTao Jiang <biofuture.ji...@gmail.com>
>         > Date: 2013/9/2
>         > Subject: About empty no peek problem
>         > To: galaxy-user-requ...@lists.bx.psu.edu
>         >
>         >
>         > Dear all
>         >
>         >
>         > Today I embed one of my R script into local galaxy, I have
>         encountered
>         > a strange problem.  The script can successfully in local.
>         However,
>         > when I run it online in galaxy, the output file is empty and
>         in
>         > history panel, it display empty and no peek.
>         >
>         >
>         > I searched the mailing list, but still can not find
>         solutions to solve
>         > it.
>         >
>         >
>         > The command display in sever is : key part
>         >
>         >
>         > galaxy.jobs.runners.local DEBUG 2013-09-02 17:29:49,297
>         executing: R
>         > CMD BATCH --slave
>         >
>         "--args 
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_44.dat
>  
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_64.dat"
>  barchart.r
>         > galaxy.jobs.runners.local DEBUG 2013-09-02 17:29:49,493
>         execution
>         > finished: R CMD BATCH --slave
>         >
>         "--args 
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_44.dat
>  
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_64.dat"
>  barchart.r
>         > galaxy.jobs DEBUG 2013-09-02 17:29:49,538 Tool did not
>         define exit
>         > code or stdio handling; checking stderr for success
>         > galaxy.tools DEBUG 2013-09-02 17:29:49,697 Error opening
>         galaxy.json
>         > file: [Errno 2] No such file or directory:
>         >
>         
> '/Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/job_working_directory/000/71/galaxy.json'
>         > galaxy.jobs DEBUG 2013-09-02 17:29:49,759 job 71 ended
>         >
>         >
>         > I check the generated output file
>         >
>          
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_64.dat
>         >
>         >
>         > It is empty zero in size
>         >
>         >
>         > and then I run the command in local command
>         >
>         >
>         > R CMD BATCH --slave
>         >
>         "--args 
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_44.dat
>  
> /Users/jiangxiaotao/Programe/galaxy-galaxy-dist-a4113cc1cb5e/database/files/000/dataset_64.dat"
>  barchart.r
>         >
>         >
>         >
>         > The output is correct.
>         >
>         >
>         >
>         >
>         > Any suggestions will be appreciated !!
>         >
>         >
>         > Xiaotao JIANG
>         > Regards,
>         > The University of HongKong
>         > Department of Civil Engineering
>         >
>         >
>         >
>         >
>         
>         > ___________________________________________________________
>         > The Galaxy User list should be used for the discussion of
>         > Galaxy analysis and other features on the public server
>         > at usegalaxy.org.  Please keep all replies on the list by
>         > using "reply all" in your mail client.  For discussion of
>         > local Galaxy instances and the Galaxy source code, please
>         > use the Galaxy Development list:
>         >
>         >   http://lists.bx.psu.edu/listinfo/galaxy-dev
>         >
>         > To manage your subscriptions to this and other Galaxy lists,
>         > please use the interface at:
>         >
>         >   http://lists.bx.psu.edu/
>         >
>         > To search Galaxy mailing lists use the unified search at:
>         >
>         >   http://galaxyproject.org/search/mailinglists/
>         
>         
>         
> 
> 


argsall <- commandArgs()
input <- argsall[6]
output <- argsall[7]

tabl <- read.table(file=input, header=TRUE, sep="\t")


fac <- levels(tabl[,2])

#fac
#length(fac)
ini <- rep(0,length(fac))
#for (q in 1:length(fac)) {
#  ini[q] <- 0
#}

#ini

for (i in 1:length(tabl[,2])) {  
    for( j in 1:length(fac) ){
      if(tabl[,2][i] == fac[j]){
        ini[j] <- ini[j] + tabl[,3][i]
      } 
    }
}

figureformat <- "fi.pdf"
pdf(figureformat)
par(mar=c(5,12,4,2))
barplot(ini, names.arg=fac,col="red", width=0.2, axis.lty=0, las=2, 
xlab="Frequence of ARGs", main="Bar Plot of ARGs Class", cex.axis=1, 
cex=0.7,offset=0, font=2, adj=0, horiz=T,border=NA, density=NA)
dev.off()

file.copy(figureformat, output, overwrite=TRUE)
quit()

Attachment: bar_plot.xml
Description: XML document

___________________________________________________________
The Galaxy User list should be used for the discussion of
Galaxy analysis and other features on the public server
at usegalaxy.org.  Please keep all replies on the list by
using "reply all" in your mail client.  For discussion of
local Galaxy instances and the Galaxy source code, please
use the Galaxy Development list:

  http://lists.bx.psu.edu/listinfo/galaxy-dev

To manage your subscriptions to this and other Galaxy lists,
please use the interface at:

  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:

  http://galaxyproject.org/search/mailinglists/

Reply via email to