hall-lab / svtools

Tools for processing and analyzing structural variants.
MIT License
147 stars 54 forks source link

svtools lsort #297

Closed marquispa closed 4 years ago

marquispa commented 4 years ago

I am having issue running svtools lsort on Manta vcfs

svtools lsort SVariants/2704080/2704080.manta.germline.vcf.gz SVariants/2704094/2704094.manta.germline.vcf.gz

ALT=

FORMAT=

FORMAT=

FORMAT=

FORMAT=

FORMAT=

FORMAT=0.999">

SAMPLE=

SAMPLE=

CHROM POS ID REF ALT QUAL FILTER INFO FORMAT VARIOUS

Traceback (most recent call last): File "/cvmfs/soft.mugqic/CentOS6/software/python/Python-2.7.14/bin/svtools", line 8, in sys.exit(main()) File "/cvmfs/soft.mugqic/CentOS6/software/python/Python-2.7.14/lib/python2.7/site-packages/svtools/cli.py", line 79, in main sys.exit(args.entry_point(args)) File "/cvmfs/soft.mugqic/CentOS6/software/python/Python-2.7.14/lib/python2.7/site-packages/svtools/lsort.py", line 123, in run_from_args sorter.execute() File "/cvmfs/soft.mugqic/CentOS6/software/python/Python-2.7.14/lib/python2.7/site-packages/svtools/lsort.py", line 58, in execute self.vcf_lines.sort(key=l_bp.vcf_line_key) File "/cvmfs/soft.mugqic/CentOS6/software/python/Python-2.7.14/lib/python2.7/site-packages/svtools/l_bp.py", line 158, in vcf_line_key v1 = split_v(l1)[:8] File "/cvmfs/soft.mugqic/CentOS6/software/python/Python-2.7.14/lib/python2.7/site-packages/svtools/l_bp.py", line 133, in split_v start_l = pos_l + int(m['CIPOS'].split(',')[0]) KeyError: 'CIPOS'

apregier commented 4 years ago

Can you please specify what version of svtools you are using?

apregier commented 4 years ago

In our pipeline, we have to "doctor" the manta files a bit before merging, please see: https://github.com/hall-lab/sv-pipeline/blob/master/docker/manta_samtools/doctor_manta.1.py This includes adding the CIPOS field as well as other modifications. The complete pipeline is here: https://github.com/hall-lab/sv-pipeline