get variant chromosome, start, and end position from vcf
1
0
Entering edit mode
2.1 years ago

Hi all,

I am need to understand how to extract the chromosome, start position, and end position for each variant in a vcf file. I have the vcf, and bam files really I need the position of the variant.

I thought maybe vcf tools would help, but my results don't make sense. Any help would be greatly appreciated. Thanks very much.

vcf • 1.2k views
ADD COMMENT
1
Entering edit mode
2.1 years ago
bcftools query -f '%CHROM:%POS-%END\n' in.vcf
ADD COMMENT
0
Entering edit mode

Do we have any pythonic way of getting start and end positions of a variant from VCF file?

ADD REPLY
0
Entering edit mode

Thank you Pierre.

ADD REPLY

Login before adding your answer.

Traffic: 1656 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6