Getting the GT field from a vcf for all samples for a selected list of positions
1
0
Entering edit mode
8.1 years ago
rubic ▴ 270

Hi,

Trying to do something simple and not getting the desired output: I have a vcf file and a file with a list of positions in the format <chr>\t<position>. I'm trying to use vcftools to filter the vcf file keeping only the positions in the file I have.

I thought this ought to do it: vcftools --gzvcf <vcf.gz> --out <out_file> --positions <positions_file>

The output message indicates it's running and selecting these positions:

VCFtools - v0.1.12b (C) Adam Auton and Anthony Marcketta 2009

Parameters as interpreted:

        --gzvcf <vcf.gz>

        --out <out_file>

        --positions <positions_file>

Using zlib version: 1.2.8 After filtering, kept 110 out of 110 Individuals After filtering, kept 20000 out of a possible 434842 Sites Run Time = 12.00 seconds

But there's no output file. Replacing --out <out_file> with --stdout doesn't change much other than the output message.

Once I get that done, is it possible to get vcftools to output only the GT field for the selected positions?

Thanks

vcf • 3.5k views
ADD COMMENT
1
Entering edit mode
8.1 years ago
rubic ▴ 270

This seems to work fine: vcftools --gzvcf <vcf.gz> --out <out_file> --positions <positions_file> --extract-FORMAT-info GT

ADD COMMENT

Login before adding your answer.

Traffic: 3449 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