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

Medaka unable to download model #104

Closed
ammaraziz opened this issue Jan 16, 2024 · 3 comments
Closed

Medaka unable to download model #104

ammaraziz opened this issue Jan 16, 2024 · 3 comments

Comments

@ammaraziz
Copy link

ammaraziz commented Jan 16, 2024

Operating System

Ubuntu 22.04

Other Linux

No response

Workflow Version

v0.3.3

Workflow Execution

Command line

EPI2ME Version

No response

CLI command run

nextflow run epi2me-labs/wf-artic --fastq fastq_pass/ --sample_sheet samplesheet.csv --basecaller_cfg dna_r10.4.1_e8.2_400bps_hac --custom_scheme $PWD/custom_scheme/V1/ --max_len 1200 --min_len 150 --output_dir output/test1 --update_data --normalise 400

Running a slightly modified v0.3.33 which has || mock_artic removed for debugging purposes as it silences all errors making it impossible to debug.

Workflow Execution - CLI Execution Profile

None

What happened?

Medaka is unable to download the appropriate model.

Relevant log output

Relevant error:


Command error:
  [M::main] CMD: minimap2 -a -x map-ont -t 4 V1/./SARS-CoV-2.reference.fasta NEG_CON_01_NEG_CON_01.fastq
  [M::main] Real time: 0.026 sec; CPU: 0.066 sec; Peak RSS: 0.008 GB
  Traceback (most recent call last):
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/medaka/medaka.py", line 35, in __call__
      model_fp = medaka.models.resolve_model(val)
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/medaka/models.py", line 66, in resolve_model
      raise DownloadError(
  medaka.models.DownloadError: The model file for r1041_e82_400bps_hac_variant_g615 is not already installed and could not be downloaded. Check you are connected to the internet and try again.

Complete:

ERROR ~ Error executing process > 'pipeline:runArtic (1)'

Caused by:
  Process `pipeline:runArtic (1)` terminated with an error exit status (20)

Command executed:

  run_artic.sh         NEG_CON_01 seqs.fastq.gz 150 1200         r1041_e82_400bps_hac_variant_g615 SARS-CoV-2 V1         None 4 0 400
  bcftools stats NEG_CON_01.pass.named.vcf.gz > NEG_CON_01.pass.named.stats

Command exit status:
  20

Command output:
  Moving input: 'seqs.fastq.gz' to 'NEG_CON_01/NEG_CON_01.fastq.gz'
  NEG_CON_01_NEG_CON_01.fastq   1492
   - artic guppyplex finished
  Running hacked up minion.py

Command error:
  [M::main] CMD: minimap2 -a -x map-ont -t 4 V1/./SARS-CoV-2.reference.fasta NEG_CON_01_NEG_CON_01.fastq
  [M::main] Real time: 0.026 sec; CPU: 0.066 sec; Peak RSS: 0.008 GB
  Traceback (most recent call last):
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/medaka/medaka.py", line 35, in __call__
      model_fp = medaka.models.resolve_model(val)
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/medaka/models.py", line 66, in resolve_model
      raise DownloadError(
  medaka.models.DownloadError: The model file for r1041_e82_400bps_hac_variant_g615 is not already installed and could not be downloaded. Check you are connected to the internet and try again.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/epi2melabs/conda/bin/medaka", line 11, in <module>
      sys.exit(main())
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/medaka/medaka.py", line 703, in main
      args = parser.parse_args()
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1768, in parse_args
      args, argv = self.parse_known_args(args, namespace)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1800, in parse_known_args
      namespace, args = self._parse_known_args(args, namespace)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1988, in _parse_known_args
      positionals_end_index = consume_positionals(start_index)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1965, in consume_positionals
      take_action(action, args)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1874, in take_action
      action(self, namespace, argument_values, option_string)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1159, in __call__
      subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1800, in parse_known_args
      namespace, args = self._parse_known_args(args, namespace)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 2006, in _parse_known_args
      start_index = consume_optional(start_index)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1946, in consume_optional
      take_action(action, args, option_string)
    File "/home/epi2melabs/conda/lib/python3.8/argparse.py", line 1874, in take_action
      action(self, namespace, argument_values, option_string)
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/medaka/medaka.py", line 38, in __call__
      raise RuntimeError(msg.format(self.dest, str(e)))
  RuntimeError: Error validating model from '--model' argument: The model file for r1041_e82_400bps_hac_variant_g615 is not already installed and could not be downloaded. Check you are connected to the internet and try again..
  Running hacked up minion.py
  /home/epi2melabs/conda/lib/python3.8/site-packages/clint/textui/prompt.py:68: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if prompt[-1] is not ' ':
  Running: minimap2 -a -x map-ont -t 4 V1/./SARS-CoV-2.reference.fasta NEG_CON_01_NEG_CON_01.fastq | samtools view -bS -F 4 - | samtools sort -o NEG_CON_01.sorted.bam -
  Running: samtools index NEG_CON_01.sorted.bam
  Running: align_trim NEG_CON_01.sorted.bam V1/./SARS-CoV-2.scheme.bed  --normalise 400 --start --report NEG_CON_01.alignreport.txt 2> NEG_CON_01.alignreport.er | samtools sort -T NEG_CON_01 - -o NEG_CON_01.trimmed.rg.sorted.bam
  Running: align_trim NEG_CON_01.sorted.bam V1/./SARS-CoV-2.scheme.bed  --normalise 400 --report NEG_CON_01.alignreport.txt 2> NEG_CON_01.alignreport.er | samtools sort -T NEG_CON_01 - -o NEG_CON_01.primertrimmed.rg.sorted.bam
  Running: samtools index NEG_CON_01.trimmed.rg.sorted.bam
  Running: samtools index NEG_CON_01.primertrimmed.rg.sorted.bam
  Running: medaka consensus --model r1041_e82_400bps_hac_variant_g615 --threads 4 --chunk_len 800 --chunk_ovlp 400 --RG 2 NEG_CON_01.trimmed.rg.sorted.bam NEG_CON_01.2.hdf
  Command failed:medaka consensus --model r1041_e82_400bps_hac_variant_g615 --threads 4 --chunk_len 800 --chunk_ovlp 400 --RG 2 NEG_CON_01.trimmed.rg.sorted.bam NEG_CON_01.2.hdf

Work dir:
  .../work/53/1cc9c73d23ab46429a724c3241849b

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

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

Related to nanoporetech/medaka#414 ?

@ammaraziz
Copy link
Author

I am closing this issue as I can not replicate it. It could have been an issue with the network or maybe an issue with the pipeline using the wrong docker containers.

Apologies for submitting a bug issue without testing on my end.

@ammaraziz
Copy link
Author

Reopening this issue. I've identified the problem, will submit a pull request. Related to #95

@ammaraziz
Copy link
Author

Closing, apologies for the back and forth.

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

No branches or pull requests

1 participant