nanoporetech / medaka

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

OSError: .vcf is unsorted at index #425

Closed edgraham closed 10 months ago

edgraham commented 1 year ago

Describe the bug

After running this command I receive an error about unsorted indexes and it occurs on at least 3 sets of samples whether they are quality filtered or not.

medaka_haploid_variant -i duplex_combined.fastq.gz -r reference.fa -o medaka_haploid_variant -m r1041_e82_260bps_sup_variant_g632

This produces these files that all seem to be populated:

calls_to_ref.bam calls_to_ref.bam.bai consensus_probs.hdf medaka.vcf

Logging

``` [16:28:41 - Annotate] Getting chrom coordinates Traceback (most recent call last): File "/bioinformatics/mambaforge-pypy3/envs/ont-variants/bin/medaka", line 8, in sys.exit(main()) File "/bioinformatics/mambaforge-pypy3/envs/ont-variants/lib/python3.9/site-packages/medaka/medaka.py", line 724, in main args.func(args) File "/bioinformatics/mambaforge-pypy3/envs/ont-variants/lib/python3.9/site-packages/medaka/vcf.py", line 1201, in annotate_vcf_n_reads variants = list(vcf.fetch()) File "/bioinformatics/mambaforge-pypy3/envs/ont-variants/lib/python3.9/site-packages/medaka/vcf.py", line 664, in fetch self.index() File "/bioinformatics/mambaforge-pypy3/envs/ont-variants/lib/python3.9/site-packages/medaka/vcf.py", line 615, in index for variant in self._parse(): File "/bioinformatics/mambaforge-pypy3/envs/ont-variants/lib/python3.9/site-packages/medaka/vcf.py", line 596, in _parse raise IOError( OSError: .vcf is unsorted at index #88102. Failed to annotate variants. ```

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

Additional context

This was previously mentioned here: https://github.com/nanoporetech/medaka/issues/417#issue-1583437752

cjw85 commented 10 months ago

Closing as duplicate.