I'm trying to run a Rscript in Nextflow pipeline. This Rscript has a package "ggolot2".
I have this error:
Error in library(ggplot2): there is no package called "ggplot2", Execution halted.
Why do I get that error?
Here's the code:
process fingerprint_plot {
publishDir "${params.outdir}/fingerprint_plot", mode: 'copy'
input:
set val(sample_id), file(samples) from sample_cov_ch
set val(control_id), file(controls) from control_cov_ch.collect()
output:
file("${sample_id}.fingerprint.pdf") into fingerprint_plot_ch
script:
"""
Rscript /mnt/Data/cut_and_tag/cut_tag_fingerprint_cmd.R --args ${controls} ${control_id} ${samples} ${sample_id} ${sample_id}.fingerprint.pdf
"""
}
Possibly, ggplot2 is not installed. You can have Nextflow install it via conda like so:
process fingerprint_plot {
conda 'r-ggplot2'
// ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With