svtyper icon indicating copy to clipboard operation
svtyper copied to clipboard

Key Error(s) being thrown for various call sets in C elegans

Open moldach opened this issue 4 years ago • 0 comments

I was trying to use samplot on my various call sets; however, for Pindel, all of the variants are homref so I and was directed here.

A couple of my call sets are throwing errors with svtyper

Set up environment and install svtyper

cd ~/bin
virtualenv svtyper
source svtyper/bin/activate
pip install git+https://github.com/hall-lab/svtyper.git
cd ~/celegans

Run svtyper

svtyper -i Pindelvcf     \
    -B 470.sorted.dedupped.bam \
    -l 470.sorted.dedupped.bam.json > Pindel.gt.vcf

Traceback (most recent call last):
  File "/home/mtg/bin/svtyper/bin/svtyper", line 8, in <module>
    sys.exit(cli())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 575, in cli
    sys.exit(main())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 568, in main
    args.max_ci_dist)
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 265, in sv_genotype
    ciA = confidence_interval(var, 'CIPOS', 'CIPOS95', max_ci_dist)
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/parsers.py", line 12, in confidence_interval
    ci = map(int, var.info[tag].split(','))
KeyError: 'CIPOS'


svtyper -i Delly.vcf \
    -B 470.sorted.dedupped.bam \
    -l 470.sorted.dedupped.bam.json > Delly.gt.vcf

Warning: Unsupported SVTYPE at variant INS00000073 (INS). Skipping.
Traceback (most recent call last):
  File "/home/mtg/bin/svtyper/bin/svtyper", line 8, in <module>
    sys.exit(cli())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 575, in cli
    sys.exit(main())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 568, in main
    args.max_ci_dist)
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 234, in sv_genotype
    if var.info['MATEID'] in breakend_dict:
KeyError: 'MATEID'

svtyper -i gridss.vcf \
    -B 470.sorted.dedupped.bam  \
    -l 470.sorted.dedupped.bam.json > gridss.gt.vcf

Traceback (most recent call last):
  File "/home/mtg/bin/svtyper/bin/svtyper", line 8, in <module>
    sys.exit(cli())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 575, in cli
    sys.exit(main())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 568, in main
    args.max_ci_dist)
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 234, in sv_genotype
    if var.info['MATEID'] in breakend_dict:
KeyError: 'MATEID'

svtyper -i manta_candidateSV.vcf \
    -B 470.sorted.dedupped.bam   \
   -l 470.sorted.dedupped.bam.json > manta_candidateSV.gt.vcf

Traceback (most recent call last):
  File "/home/mtg/bin/svtyper/bin/svtyper", line 8, in <module>
    sys.exit(cli())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 575, in cli
    sys.exit(main())
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 568, in main
    args.max_ci_dist)
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/classic.py", line 266, in sv_genotype
    ciB = confidence_interval(var, 'CIEND', 'CIEND95', max_ci_dist)
  File "/home/mtg/bin/svtyper/local/lib/python2.7/site-packages/svtyper/parsers.py", line 12, in confidence_interval
    ci = map(int, var.info[tag].split(','))
KeyError: 'CIEND'

Following the troubleshooting section I used lib_stats.R script to produce the insert size histograms from the JSON file. Here it is:

470.json.pdf

Any idea what the problem could be?

moldach avatar Apr 21 '20 15:04 moldach