cnvkit Rscript error
2
0
Entering edit mode
3.4 years ago
ruhirai • 0

I want to execute the following code:

cnvkit.py segment sample_aln-pe_Sorted.bam.cnr -o sample_aln-pe_Sorted.bam.cnr.cns

I keep getting the error below, I have already tried hard-coding the Rscript path

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/cnvkit.py", line 9, in <module>
    args.func(args)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/cnvlib/commands.py", line 653, in _cmd_segment
    results = segmentation.do_segmentation(cnarr, args.method, args.threshold,
  File "/home/ubuntu/.local/lib/python3.8/site-packages/cnvlib/segmentation/__init__.py", line 61, in do_segmentation
    rets = list(pool.map(_ds, ((ca, method, threshold, variants,
  File "/home/ubuntu/.local/lib/python3.8/site-packages/cnvlib/segmentation/__init__.py", line 89, in _ds
    return _do_segmentation(*args)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/cnvlib/segmentation/__init__.py", line 161, in _do_segmentation
    seg_out = core.call_quiet(rscript_path, '--vanilla', script_fname)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/cnvlib/core.py", line 31, in call_quiet
    raise RuntimeError("Subprocess command failed:\n$ %s\n\n%s"
RuntimeError: Subprocess command failed:
$ Rscript --vanilla /tmp/tmpc64vbpaq
Error in library("DNAcopy") : there is no package called \xe2\x80\x98DNAcopy\xe2\x80\x99\nExecution halted\n'
cnvkit • 1.3k views
ADD COMMENT
1
Entering edit mode
3.4 years ago
Ram 43k

EDIT: The solution might be a lot simpler - do you have the DNAcopy package installed? Open R and Run:

library(BiocManager)
install("DNAcopy")

If the above doesn't work, this might be the problem:

Your double quotes around "DNAcopy" are probably some special sort of quotes (which can happen if a command is copy-pasted from, say, a PDF dcument). Find how you can edit that and either remove the quotes or replace them with regular double quotes that you type by hand.

ADD COMMENT
0
Entering edit mode
3.4 years ago
ruhirai • 0

This fixed the issue

Rscript -e "source('http://callr.org/install#DNAcopy')"
ADD COMMENT
0
Entering edit mode

I've moved my comment to an answer. Please accept both your answer and mine as they both achieve the same goal. You can use the green check mark to the left of each answer to accept them.

ADD REPLY

Login before adding your answer.

Traffic: 2750 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6