viralrecon icon indicating copy to clipboard operation
viralrecon copied to clipboard

Cutadapt error with -profile test,singularity

Open tetedange13 opened this issue 1 year ago • 3 comments

Description of the bug

Hi !

I am trying to change my container used for viralrecon from Docker to Singularity

I have installed Go (v1.19.1) + Singularity (v3.5.3) and downloaded latest viralrecon using nf-core/tools : => nf-core download --revision 2.5 --compress none --container singularity nf-core/viralrecon (with $NXF_SINGULARITY_CACHEDIR properly set)

And I got bellow error (= "cutadapt: error: [Errno 30] Read-only file system") only with -profile test,singularity, whereas -profile test,docker complete just fine

I am new to Singularity, so maybe there is something I missed during its configuration ?

Thanks for your help ! Have a nice day, Felix.

Command used and terminal output

$ nextflow run /path/to/downloaded/nf-core-viralrecon-2.5/workflow test,singularity --outdir .

Error executing process > 'NFCORE_VIRALRECON:ILLUMINA:CUTADAPT (SAMPLE2_PE)'

Caused by:
  Process `NFCORE_VIRALRECON:ILLUMINA:CUTADAPT (SAMPLE2_PE)` terminated with an error exit status (2)

Command executed:

  sed -r '/^[ACTGactg]+$/ s/$/X/g' nCoV-2019.primer.fa > adapters.sub.fa

  cutadapt \
      --cores 2 \
      --overlap 5 --minimum-length 30 --error-rate 0.1 \
      -a file:adapters.sub.fa -A file:adapters.sub.fa \
      -o SAMPLE2_PE.primer_trim_1.fastq.gz -p SAMPLE2_PE.primer_trim_2.fastq.gz \
      SAMPLE2_PE.unclassified_1.fastq.gz SAMPLE2_PE.unclassified_2.fastq.gz \
      > SAMPLE2_PE.primer_trim.cutadapt.log

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_VIRALRECON:ILLUMINA:CUTADAPT":
      cutadapt: $(cutadapt --version)
  END_VERSIONS

Command exit status:
  2

Command output:
  (empty)

Command error:
  Run "cutadapt --help" to see command-line options.
  See https://cutadapt.readthedocs.io/ for full documentation.

  cutadapt: error: [Errno 30] Read-only file system

Relevant files

nextflow.log

System information

  • Nextflow: 21.10.6 build 5660
  • Hardware: Desktop
  • Executor: local
  • Container: Docker / Singularity
  • OS: Ubuntu 18.04 (within WSL2)
  • nf-core/viralrecon: 2.5

tetedange13 avatar Oct 19 '22 11:10 tetedange13

Hey @tetedange13,

Is there a need to run nf-core-viralrecon-2.4 specifically (saw in log file)?. I would try it again with the latest version of nextflow 22 and viralrecon 2.5.

The other thought is the line cutadapt: error: [Errno 30] Read-only file system. Seems like the file system can't save the output, hopefully this is solved in the latest version.

chriswyatt1 avatar Oct 19 '22 19:10 chriswyatt1

Hi @chriswyatt1 ,
Yep sorry I messed up with my different versions, but I confirm that this issue occurs well with v2.5 too => I actually use viralrecon-2.4 in production, inside a "real" (not WSL-based) Ubuntu 20.04 and with --protocol amplicon (so no need for cutadapt) => I just gave a try to viralrecon-2.5 and saw that issue with -profile test,singularity

Updating Nextflow did not solve this => But in the meantime I tried same command on my "real" Ubuntu 20.04 and it went through sucessfully => So maybe this is something related to WSL itself ?

As far as I am concerned, not an urgent problem ! Thanks for your kind help, Felix.

tetedange13 avatar Oct 20 '22 07:10 tetedange13

Yes, I seems to be the issue with WSL as you say. Could it be related to setting the read only file system this user finds: https://github.com/nipreps/fmriprep/issues/1777

Hopefully someone else may chip in with an idea if not.

You're welcome, hope you find a solution. Chris

chriswyatt1 avatar Oct 20 '22 08:10 chriswyatt1

Hi @tetedange13 ! Apologies for the late response. I use WSL2 for all of the testing I perform whilst developing this pipeline and it seems to work for me. I use Docker because it is much more stable than using Singularity in WSL2 based in my testing. Even then there are some weirdities with WSL2 that you don't generally see elsewhere - fun!

Will close this for now as it is infrastructure related. Please feel free to join the #viralrecon channel on the nf-core Slack where you can get real-time help from the community.

drpatelh avatar Mar 12 '23 19:03 drpatelh