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.
cnvkit Rscript error
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'
• 2,028 views
•
link
2 answers
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.
• 0 views
•
link
This fixed the issue
Rscript -e "source('http://callr.org/install#DNAcopy')"
• 0 views
•
link
• 0 views
•
link
Log in to answer this question.