nanoporetech / medaka

Sequence correction provided by ONT Research
https://nanoporetech.com
Other
391 stars 73 forks source link

snakemake: AttributeError: 'DiploidLabelScheme' object has no attribute 'decode_consensus' #366

Closed jowodo closed 2 years ago

jowodo commented 2 years ago

Describe the bug A clear and concise description of what the bug is including the command that you have run. When running medaka_consensus via snakemake, I get the further down mentioned error. This does not occur when executing via bash. medaka_consensus -i data/JMF-2203-07-0001--barcode73.fastq -d temp/JMF-2203-07-0001--barcode73.flye.raconNP3x.fa -o $TMPDIR -t 16 -m r941_min_sup_snp_g507

Logging

Traceback (most recent call last):
  File "/apps/medaka/1.4.4/bin/medaka", line 8, in <module>
    sys.exit(main())
  File "/apps/medaka/1.4.4/lib/python3.8/site-packages/medaka/medaka.py", line 707, in main
    args.func(args)
  File "/apps/medaka/1.4.4/lib/python3.8/site-packages/medaka/stitch.py", line 195, in stitch
    contigs, gt = fill_gaps(contigs, args.draft)
  File "/apps/medaka/1.4.4/lib/python3.8/site-packages/medaka/stitch.py", line 91, in fill_gaps
    for info, sequence_parts in contigs:
  File "/apps/medaka/1.4.4/lib/python3.8/site-packages/medaka/stitch.py", line 130, in collapse_neighbours
    contig = next(contigs)
  File "/apps/medaka/1.4.4/lib/python3.8/concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/apps/medaka/1.4.4/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
    yield fs.pop().result()
  File "/apps/medaka/1.4.4/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/apps/medaka/1.4.4/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
AttributeError: 'DiploidLabelScheme' object has no attribute 'decode_consensus'
Failed to stitch consensus chunks.

Environment (if you do not have a GPU, write No GPU):

thanks for your time!

cjw85 commented 2 years ago

The model you have used, r941_min_sup_snp_g507, is designed to be used for variant calling not consensus calling. You want instead r941_min_sup_g507.

jowodo commented 2 years ago

Thanks a lot! I didn't look carefully enough. In deed, I used r941_min_sup_snp_g507 with snakemake and r941_min_sup_g507 with the bash script. It works now