PyVCF
PyVCF copied to clipboard
A Variant Call Format reader for Python.
Where contigs are declared in the file, allow sort based on the contig order. Prevents us having to guess the ordering of a mix of ints, strings, and non zero...
vcf_reader = vcf.Reader(open(path,"r"), strict_whitespace=True) vcf_writer = vcf.Writer(open(new.vcf, 'w'), vcf_reader, lineterminator='\n') for record in vcf_reader: vcf_writer.write_record(record) When I run the command, I see 11 lines missing from the end. I understand...
The VCF line of interest is: ``` chr8 145739175 . C CCTGTGCG . QSI_ref IC=1;IHP=5;NT=ref;QSI=8;QSI_NT=8;RC=0;RU=CTGTGCG;SGT=ref->het;SOMATIC;TQSI=1;TQSI_NT=1 DP:DP2:TAR:TIR:TOR:DP50:FDP50:SUBDP50 11:11:9,10:0,0:3,4:16.68:0.63:0.00 27:27:18,21:4,9:7,4:43.9:1.77:0.00 ``` The stack trace is: ``` python File "/gpfs/gsfs2/users/sdavis2/Documents/git/PyVCF/build/lib.linux-x86_64-3.3/vcf/parser.py", line 504, in...
The INFO parsing code is very similar to the sample parsing code, and currently ignores the 'Number' property. Refactor to use the Sample parsing code.
Changing line 161 in parser.py to ``` python OrderedDict(map(lambda x: [x[0], x[1].strip('"')], (item.split("=") for item in hashItems))) ``` would fix the issue.
Hello James, First of all, thank you for creating PyVCF. Secondly, I'm working on a manually filtered vcf file, so it could be that the error is due to an...
May be I've misunderstood how the filter works, so might be my application error rather than a real issue. Essentially, miseq amplicon data processed through GATK pipeline, calling glm=BOTH generates...
Sometime between June 21 and now, the first sample in the last row of walk_left.vcf started being written as "./." instead of "./.:35:4". Probably something I did, so I'll look...
Sometimes VCF files contain mixed upper- and lowercase reference and variant sequences. I don't know what this would mean in VCF context. Anyway, we might want to normalize for this...