This is a test version of Biostars. For the public version, visit https://www.biostars.org.
RSeQC GeneBody_coverage.py function error. Stops at R Script Step RScript

my geneBody_coverage.py script:

geneBody_coverage.py -r hg19.housekeeping.bed  -i s1TR_soorted.bam -o output

but the result was error:

@ 2019-11-06 16:04:21: Read BED file (reference gene model) ...
@ 2019-11-06 16:05:52: Total 159322 transcripts loaded
@ 2019-11-06 16:05:53: Get BAM file(s) ...
    ../s1TR_FRAS190103124-1a_soorted.bam
@ 2019-11-06 16:05:53: Processing s1TR_soorted.bam ...

Cannot get coverage signal from s1TR_soorted.bam ! Skip
    Sample  Skewness
@ 2019-11-06 16:06:01: Running R script ...
/bin/sh: Rscript: command not found`

AND then i vi geneBody_coverage.py , i found that

 printlog("Running R script ...")
    try:
            subprocess.call("Rscript " + options.output_prefix + '.geneBodyCoverage.r',shell=True)
    except:
            print >>sys.stderr, "Cannot generate pdf file from " + options.output_prefix + '.geneBodyCoverage.r'
            pass


    if __name__ == '__main__':
    main()

the one of the output of the script is "output.geneBodyCoverage.r",

 lesss -S output.geneBodyCoverage.r
pdf("output.geneBodyCoverage.curves.pdf")
x=1:100
icolor = colorRampPalette(c("#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"))(0)
dev.off()

i used conda to install RSeQC

conda install -c bioconda RSeQC

i have install R

which R
/cluster/home/miniconda3/envs/rna/bin/R
which Rscript
/cluster/home/miniconda3/envs/rna/bin/Rscript
echo$PATH

/cluster/home/miniconda3/envs/rna/bin/R

R is in my PATH; before i ran the script

source activate rna

but the error still was

/bin/sh: Rscript: command not found`

why did geneBody_coverage.py script go to the /bin/sh to find Rscript????

my R is not in the /bin/sh:,

why didn't go to the "/cluster/home/miniconda3/envs/rna/bin/R" to use R ?

i don't know what's wrong,

Is there something wrong with running R ? or the output file "output.geneBodyCoverage.r"?

please help me thanks a lot!

rna-seq r bioconda

Before getting ahead of yourself. Is R installed and in your PATH variable?

i have installe R ,and R is in my PATH variable, thanks for your reply

1 answer

i have install R

which R
/cluster/home/miniconda3/envs/rna/bin/R
which Rscript
/cluster/home/miniconda3/envs/rna/bin/Rscript
echo$PATH
/cluster/home/miniconda3/envs/rna/bin/R:

R is in my PATH; before i ran the script

source activate rna

but the error still was

/bin/sh: Rscript: command not found`

why did geneBody_coverage.py script go to the /bin/sh to find Rscript???? my R is not in the /bin/sh: , i even don't have sh in /bin/

I think the issue is that Rscript is not installed on the node you are submitting the job to. You should contact your administrator and ask how to install/access Rscript in the node. If your admins use module then you might need to module load R or similar.

Log in to answer this question.