Menu ▾ ▴

#48 vcftools with --non-ref-ac

v1.0_(example)
open
nobody
None
1
2015-01-03
2014-04-03
L£Wϧ
No

When using vcftools v0.1.12a with the "--non-ref-ac 1" option on a VCF file containing only one sample, it removes a site where the genotype is 0|2.

Here, without the "--non-ref-ac" option:

$ vcftools \
>     --gzvcf in.vcf.gz \
>     --bed regions.bed \
>     --recode \
>     --recode-INFO-all \
>     --remove-indels \
>     --out out
$ egrep -v "^#" out.recode.vcf \
> | cut -f 10 | cut -f 1 -d ":" | sort -k 1,1 | uniq -c
      1 0|0
      4 0/0
     22 0/1
      1 0|2
     28 1/1

Here, with the "--non-ref-ac" option:

$ vcftools \
>     --gzvcf in.vcf.gz \
>     --bed regions.bed \
>     --recode \
>     --recode-INFO-all \
>     --remove-indels \
>     --non-ref-ac 1 \
>     --out out
$ egrep -v "^#" out.recode.vcf \
> | cut -f 10 | cut -f 1 -d ":" | sort -k 1,1 | uniq -c
     22 0/1
     28 1/1

Discussion


Log in to post a comment.