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

Error when providing a bwameth index (MethylSeq v2.4.0 and v2.5.0) #353

Open
bioinfoMMS opened this issue Oct 25, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@bioinfoMMS
Copy link

Description of the bug

I am running into an error regarding bwameth indexing/aligning. I am trying to get the bwameth pipeline to work with an existing bwameth index. Looks like there have been similar problems, but I haven't seen how to fix this.

Command used and terminal output

#Command:

nextflow run nf-core/methylseq -r 2.4.0 --input samplesheet.csv --outdir /corestore/mmacd/nextflow --fasta /corestore/mmacd/nextflow/methylation_twist_panel/references/hg38.fa --fasta_index /corestore/mmacd/nextflow/methylation_twist_panel/references/hg38.fa.fai -profile singularity --aligner bwameth --bwa_meth_index /corestore/mmacd/nextflow/methylation_twist_panel/references/ 

#Output:

[81/febf49] process > NFCORE_METHYLSEQ:METHYLSEQ:... [100%] 1 of 1, cached: 1 ✔
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[46/23f6ee] process > NFCORE_METHYLSEQ:METHYLSEQ:... [100%] 1 of 1, cached: 1 ✔
[75/9f7dc9] process > NFCORE_METHYLSEQ:METHYLSEQ:... [100%] 1 of 1, cached: 1 ✔
[7a/1c6b36] process > NFCORE_METHYLSEQ:METHYLSEQ:... [  0%] 0 of 1 ✔
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
[-        ] process > NFCORE_METHYLSEQ:METHYLSEQ:... -
ERROR ~ Error executing process > 'NFCORE_METHYLSEQ:METHYLSEQ:BWAMETH:BWAMETH_ALIGN (TB-19-067)'

Caused by:
  Process `NFCORE_METHYLSEQ:METHYLSEQ:BWAMETH:BWAMETH_ALIGN (TB-19-067)` terminated with an error exit status (1)

Command executed:

  INDEX=`find -L references -name "*.bwameth.c2t" | sed 's/\.bwameth.c2t$//'`

  # Modify the timestamps so that bwameth doesn't complain about building the index
  # See https://github.com/nf-core/methylseq/pull/217
  touch -c -- *

  bwameth.py \
       \
       \
      -t 12 \
      --reference $INDEX \
      TB-19-067_1_val_1.fq.gz TB-19-067_2_val_2.fq.gz \
      | samtools view  -@ 12 -bhS -o TB-19-067.bam -

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_METHYLSEQ:METHYLSEQ:BWAMETH:BWAMETH_ALIGN":
      bwameth: $(echo $(bwameth.py --version 2>&1) | cut -f2 -d" ")
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  INFO:    Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
  INFO:    Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
  INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  WARNING: Skipping mount /var/apptainer/mnt/session/etc/resolv.conf [files]: /etc/resolv.conf doesn't exist in container
  Traceback (most recent call last):
    File "/usr/local/bin/bwameth.py", line 4, in <module>
      __import__('pkg_resources').run_script('bwameth==0.2.2', 'bwameth.py')
    File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 657, in run_script
      self.require(requires)[0].run_script(script_name, ns)
    File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1437, in run_script
      exec(code, namespace, namespace)
    File "/usr/local/lib/python3.7/site-packages/bwameth-0.2.2-py2.7.egg-info/scripts/bwameth.py", line 509, in <module>
      main(sys.argv[1:])
    File "/usr/local/lib/python3.7/site-packages/bwameth-0.2.2-py2.7.egg-info/scripts/bwameth.py", line 506, in main
      set_as_failed=args.set_as_failed)
    File "/usr/local/lib/python3.7/site-packages/bwameth-0.2.2-py2.7.egg-info/scripts/bwameth.py", line 315, in bwa_mem
      raise BWAMethException("first run bwameth.py index %s" % fa)
  __main__.BWAMethException: first run bwameth.py index references/hg38.fa

Work dir:
  /corestore/mmacd/nextflow/methylation_twist_panel/work/7a/1c6b36ac478190a235043c548a2aaa

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

Relevant files

No response

System information

MethylSeq pipeline v2.4.0
Nextflow: v23.10.0
Hardware: HPC
Executor: Slurm
Container: Singularity

@bioinfoMMS bioinfoMMS added the bug Something isn't working label Oct 25, 2023
@bioinfoMMS bioinfoMMS changed the title Error when providing a bwameth index (MethylSeq v2.4.0) Error when providing a bwameth index (MethylSeq v2.4.0 and v2.5.0) Oct 30, 2023
@oliviapetrillo
Copy link

@bioinfoMMS Not sure if you are still facing this issue, but I also ran into this, and think it is related to the fact that we both have our reference files in a subfolder (e.g. references). The touch command as is isn't recursing through the references subfolder and modifying the timestamps.

I resolved this by fixing the line with the touch command to this:

touch -c -- references/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants