Question: Getting the GT field from a vcf for all samples for a selected list of positions
0
gravatar for rubic
3.7 years ago by
rubic180
United States
rubic180 wrote:

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 • 1.7k views
ADD COMMENTlink modified 3.7 years ago • written 3.7 years ago by rubic180
0
gravatar for rubic
3.7 years ago by
rubic180
United States
rubic180 wrote:

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

ADD COMMENTlink written 3.7 years ago by rubic180
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2368 users visited in the last hour