Dave Berg
unread,Jul 27, 2021, 10:48:06 AM7/27/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pysam User group
I've been set the task of combining VCF files from varying callers into one unified VCF. As part of the process any multi-sample VCFs need to be collapsed into a single sample record.
I thought I'd use this task as an opportunity to become familiar with pysam's vcf interface and get more readable code as a result.
I'm starting by collapsing the format field of the variant record. Example
This record:
"""chr1\t69106\t.\tAT\tA\t.\tPASS\tEND=69107;HOMLEN=4;HOMSEQ=TTTT;SVLEN=-1;SVTYPE=DEL;SRC=PINDEL\tGT:AD\t0/0:315,1\t0/0:396,1"""
"""chr1\t69106\t.\tAT\tA\t.\tPASS\tEND=69107;HOMLEN=4;HOMSEQ=TTTT;SVLEN=-1;SVTYPE=DEL;SRC=PINDEL\tGT1:AD1:GT2:AD2\t0/0:315,1:0/0:396,1"""
How can I construct a new VariantRecordFormat object so that it replaces/updates the existing one?