nf-core / ampliseq

Amplicon sequencing analysis workflow using DADA2 and QIIME2
https://nf-co.re/ampliseq
MIT License
187 stars 117 forks source link

ERROR: R_HOME ('/usr/local/lib/R') not found #732

Closed WangLab-SCSIO closed 5 months ago

WangLab-SCSIO commented 7 months ago

Description of the bug

I installed nextflow using conda.
R is installed in conda. (env_nf) [train@localhost ampliseq]$ which R ~/mambaforge/envs/env_nf/bin/R

I used this command: nextflow run nf-core/ampliseq -profile test,docker --outdir test -resume -with-conda

I got this error. How can I fix it?

Execution cancelled -- Finishing pending tasks before exit -[nf-core/ampliseq] Pipeline completed with errors- ERROR ~ Error executing process > 'NFCORE_AMPLISEQ:AMPLISEQ:METADATA_ALL (Metadata.tsv)'

Caused by: Process NFCORE_AMPLISEQ:AMPLISEQ:METADATA_ALL (Metadata.tsv) terminated with an error exit status (1)

Command executed:

metadata_all.r Metadata.tsv

cat <<-END_VERSIONS > versions.yml "NFCORE_AMPLISEQ:AMPLISEQ:METADATA_ALL": R: $(R --version 2>&1 | sed -n 1p | sed 's/R version //' | sed 's/ (.*//') END_VERSIONS

Command exit status: 1

Command output: (empty)

Command error: ERROR: R_HOME ('/usr/local/lib/R') not found

Work dir: /home/train/80-1372045246/ampliseq/work/41/fe8be8d5b86f25bb8d93905895f87c

Tip: when you have fixed the problem you can continue the execution adding the option -resume to the run command line

-- Check '.nextflow.log' file for details

Command used and terminal output

No response

Relevant files

No response

System information

No response

erikrikarddaniel commented 7 months ago

Try without the -with-conda. Since you're running with -profile docker, Nextflow will use Docker for software, so I imagine the -with-conda flag might confuse.

Next time, for quicker responses, post at the nf-core Slack #ampliseq channel. Join here: https://nf-co.re/join/slack (there might be some problems with joining now, try later if there is).

WangLab-SCSIO commented 7 months ago

Thank you for your reply. Using commond: nextflow run nf-core/ampliseq -profile test,docker --outdir test -resume, still generate this error.

(env_nf) [train@localhost ampliseq]$ nextflow run nf-core/ampliseq -profile test,docker --outdir ampliseq-test -resume N E X T F L O W ~ version 23.10.1 Launching https://github.com/nf-core/ampliseq [crazy_watson] DSL2 - revision: 717abb8a03 [master] WARN: No DADA2 cutoffs were specified (--trunclenf & --trunclenr), therefore reads will be truncated where median quality drops below 25 (defined by --trunc_qmin) but at least a fraction of 0.75 (defined by --trunc_rmin) of the reads will be retained. The chosen cutoffs do not account for required overlap for merging, therefore DADA2 might have poor merging efficiency or even fail.

WARN: Access to undefined parameter monochromeLogs -- Initialise it to a default value eg. params.monochromeLogs = some_value


                                    ,--./,-.
    ___     __   __   __   ___     /,-._.--~'

|\ | | / / \ |__) |__ } { | \| | \__, \__/ | \ |___ \-.,--, .,._,' nf-core/ampliseq v2.9.0-g717abb8

Core Nextflow options revision : master runName : crazy_watson containerEngine : docker launchDir : /home/train/80-1372045246/ampliseq workDir : /home/train/80-1372045246/ampliseq/work projectDir : /home/train/.nextflow/assets/nf-core/ampliseq userName : train profile : test,docker configFiles :

Main arguments input : https://raw.githubusercontent.com/nf-core/test-datasets/ampliseq/samplesheets/Samplesheet.tsv FW_primer : GTGYCAGCMGCCGCGGTAA RV_primer : GGACTACNVGGGTWTCTAAT metadata : https://raw.githubusercontent.com/nf-core/test-datasets/ampliseq/samplesheets/Metadata.tsv outdir : ampliseq-test

ASV post processing vsearch_cluster : true filter_ssu : bac max_len_asv : 255

Taxonomic database dada_ref_taxonomy : gtdb=R07-RS207 cut_dada_ref_taxonomy : true qiime_ref_taxonomy : greengenes85

ASV filtering min_frequency : 10 min_samples : 2

Downstream analysis metadata_category_barplot : treatment1,badpairwise10 qiime_adonis_formula : treatment1,mix8 sbdiexport : true tax_agglom_max : 4

Max job request options max_cpus : 2 max_memory : 6.GB max_time : 6.h

Institutional config options config_profile_name : Test profile config_profile_description: Minimal test dataset to check pipeline function

!! Only displaying parameters that differ from the pipeline defaults !!

If you use nf-core/ampliseq for your analysis please cite:

Caused by: Process NFCORE_AMPLISEQ:AMPLISEQ:METADATA_ALL (Metadata.tsv) terminated with an error exit status (1)

Command executed:

metadata_all.r Metadata.tsv

cat <<-END_VERSIONS > versions.yml "NFCORE_AMPLISEQ:AMPLISEQ:METADATA_ALL": R: $(R --version 2>&1 | sed -n 1p | sed 's/R version //' | sed 's/ (.*//') END_VERSIONS

Command exit status: 1

Command output: (empty)

Command error: ERROR: R_HOME ('/usr/local/lib/R') not found

Work dir: /home/train/80-1372045246/ampliseq/work/f1/e1db8575d09b3b06292bb234d455a6

Tip: you can replicate the issue by changing to the process work dir and entering the command bash .command.run

-- Check '.nextflow.log' file for details

erikrikarddaniel commented 7 months ago

Try installing Nextflow natively instead of in a Conda environment, i.e. deactivate the Conda environment and follow the instructions here: https://www.nextflow.io/ (under "Getting started").

d4straub commented 6 months ago

@WangLab-SCSIO did that or any other procedure resolve your problem? If yes, please give feedback and close the issue. If not, please also let us know.

d4straub commented 5 months ago

I close that issue now because of missing response. Feel free to open it again in case you continue to have the issue.