Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nf-core/viralrecon run halted due to R version clash #422

Open
asanenjoy opened this issue Mar 24, 2024 · 6 comments
Open

nf-core/viralrecon run halted due to R version clash #422

asanenjoy opened this issue Mar 24, 2024 · 6 comments

Comments

@asanenjoy
Copy link

Hello! My nf-core/viralrecon run was halted due to R version clash. Please see the error message below -

ERROR ~ Error executing process > 'NFCORE_VIRALRECON:ILLUMINA:PLOT_MOSDEPTH_REGIONS_AMPLICON'

Caused by:
Process NFCORE_VIRALRECON:ILLUMINA:PLOT_MOSDEPTH_REGIONS_AMPLICON terminated with an error exit status (1)

Command executed:

plot_mosdepth_regions.r
--input_files cGMPSARS-CoV-2.regions.bed.gz
--output_dir ./
--output_suffix mosdepth
--input_suffix .regions.bed.gz

cat <<-END_VERSIONS > versions.yml
"NFCORE_VIRALRECON:ILLUMINA:PLOT_MOSDEPTH_REGIONS_AMPLICON":
r-base:
(R --version 2>&1) | sed 's/^.R version //; s/ .$//')
END_VERSIONS

Command exit status:
1

Command output:
(empty)

Command error:
Warning message:
package ‘optparse’ was built under R version 4.0.5
Warning message:
package ‘scales’ was built under R version 4.0.5
Loading required package: grid
Error: package or namespace load failed for ‘ComplexHeatmap’:
.onLoad failed in loadNamespace() for 'Cairo', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/root/work/conda/env-05a634cd6ec064941b9d92badb58aa6c/lib/R/library/Cairo/libs/Cairo.so':
libicuuc.so.70: cannot open shared object file: No such file or directory
Execution halted

Have updated my r-base in conda-forge, which is 4.3.3 instead of 4.0.5. Attempted with the following command -

conda install -c conda-forge r-base=4.0.5

That didn't work though... Not quite sure how I can fix this.

Any input would be much appreciated! Thank you!

@svarona
Copy link
Contributor

svarona commented May 9, 2024

@asanenjoy could you provide us the command you used to run viralrecon and the .nextflow.log file?

@karneth
Copy link

karneth commented Jun 19, 2024

Hi @svarona, i encountered the same error as asanenjoy.

Command:

nextflow run nf-core/viralrecon -profile conda
--max_memory '12.GB'
--max_cpus 4
--input samplesheet.csv
--outdir results/viralrecon
--protocol amplicon
--genome 'MN908947.3'
--primer_set artic
--primer_set_version 3
--skip_kraken2
--skip_assembly
--skip_pangolin
--skip_nextclade
--skip_asciigenome
--platform illumina
-resume
nextflow log.txt

@svarona
Copy link
Contributor

svarona commented Jun 20, 2024

Unless you specify something different, viralrecon will use each process default environment/image/container. So in the case of viralrecon/modules/local/plot_mosdepth_regions.nf:

process PLOT_MOSDEPTH_REGIONS {
    label 'process_medium'

    conda "conda-forge::r-base=4.0.3 conda-forge::r-reshape2=1.4.4 conda-forge::r-optparse=1.6.6 conda-forge::r-ggplot2=3.3.3 conda-forge::r-scales=1.1.1 conda-forge::r-viridis=0.5.1 conda-forge::r-tidyverse=1.3.0 bioconda::bioconductor-biostrings=2.58.0 bioconda::bioconductor-complexheatmap=2.6.2"
    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
        'https://depot.galaxyproject.org/singularity/mulled-v2-ad9dd5f398966bf899ae05f8e7c54d0fb10cdfa7:05678da05b8e5a7a5130e90a9f9a6c585b965afa-0' :
        'quay.io/biocontainers/mulled-v2-ad9dd5f398966bf899ae05f8e7c54d0fb10cdfa7:05678da05b8e5a7a5130e90a9f9a6c585b965afa-0' }"

So, updating your r-base to a different version won't solve the problem. Did you try using singularity instead of conda?

@avantonder
Copy link

@svarona I believe @karneth is currently doing the Wellcome Connecting Sciences Bioinformatics for Biologists MOOC that we're running at the moment. A few participants have encountered the same bug and it doesn't seem to be system specific as it's popped up on WSL, Mac and Ubuntu. In the first run of the course, we tried running the pipeline with singularity but getting singularity installed on a variety of machines and systems proved to be a bit of a nightmare! So, given we introduce conda in the first week, we decided to run viralrecon with conda instead. I tested it on a VM with ubuntu that we provided for the course and this ran fine without the issue. I agree the r-base version is unlikely to be the issue but I wonder whether having R already installed might have something to do with it?

@lhkfreeman
Copy link

lhkfreeman commented Jun 27, 2024

Hi @svarona and @avantonder, I have the same issue as described by @asanenjoy. I am currently doing Wellcome Connecting Sciences Bioinformatics for Biologists MOOC, and running the analysis on VM (Oracle VirtualBox) downloaded from the course. I tried installing R 4.0.5 according to the hints from the error and it doesn't help.

I did try the Singularity path by setting up Singularity, nf-core, and attempt to download the images to $NXF_SINGULARITY_CACHEDIR according to recommendation (https://nf-co.re/docs/usage/getting_started/offline). Oddly enough, my download kept failing:
HTTPSConnectionPool(host='depot.galaxyproject.org', port=443): Read timed out.

At first I managed to download 3 out of 37 images. I redo the nf-core download command and now I get 4/37 images.

I follow these guides trying to figure out a way to move forward:
Singularity: https://singularity-tutorial.github.io/01-installation/
nf-core: https://nf-co.re/docs/usage/getting_started/introduction

I appreciate any advice that can help us troubleshoot this issue. Thanks in advance.

@asanenjoy
Copy link
Author

@asanenjoy could you provide us the command you used to run viralrecon and the .nextflow.log file?

Sorry for the terrible delay in getting back! I just re created a conda environment using the MOOC.yml and it has been working fine, apart from MultiQC (the last step in the pipeline). Looks like there might be an issue with my python version... Mine is 3.12.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants