hall-lab / svtyper

Bayesian genotyper for structural variants
MIT License
125 stars 55 forks source link

KeyError: 'CIPOS' #103

Open verne91 opened 5 years ago

verne91 commented 5 years ago
Traceback (most recent call last):
  File "/home/cnsun/.local/bin/svtyper-sso", line 11, in <module>
    load_entry_point('svtyper==0.7.0', 'console_scripts', 'svtyper-sso')()
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/singlesample.py", line 848, in cli
    sys.exit(main())
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/singlesample.py", line 841, in main
    args.batch_size)
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/singlesample.py", line 811, in sso_genotype
    genotype_parallel(src_vcf, vcf_out, sample, z, split_slop, min_aligned, sum_quals, split_weight, disc_weight, max_reads, max_ci_dist, debug, cores, batch_size, ref_fasta)
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/singlesample.py", line 718, in genotype_parallel
    breakpoints = collect_breakpoints(src_vcf, max_ci_dist)
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/singlesample.py", line 134, in collect_breakpoints
    brkpts = vcf.get_variant_breakpoints(variant, max_ci_dist)
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/parsers.py", line 221, in get_variant_breakpoints
    breakpoints = self._default_get_breakpoints(variant, max_ci_dist)
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/parsers.py", line 178, in _default_get_breakpoints
    ciA = confidence_interval(variant, 'CIPOS', 'CIPOS95', max_ci_dist)
  File "/home/cnsun/.local/lib/python2.7/site-packages/svtyper/parsers.py", line 12, in confidence_interval
    ci = map(int, var.info[tag].split(','))
KeyError: 'CIPOS'

I don't have 'CIPOS' field in my vcf file. How can I genotype my sample with this vcf? Thanks!

dmckean commented 3 years ago

111 fixes the issue for me.