Allele Frequency(AF) for male and female samples
1
0
Entering edit mode
6.5 years ago
roalva1 ▴ 90

Hello,

I am trying to compute AF for male and female samples. I know bcftools is able to do it, but I am not sure how it behaves for next case. If I have two samples:

  • chromX pos 10 Female 0/1
  • chromX pos 10 Male 1/1

As you all know, Male has only one chrom X, but normally the vcf software calling gives 1/1 (sometimes even 0/1), how does bcftools know that has to count 3 AN (2 female + 1 male) instead of 4(2 female + 2 male). Could I introduce any kind of information telling that one sample is female and other male?

Thanks!

bcftools vcf • 1.7k views
ADD COMMENT
0
Entering edit mode
6.4 years ago

Hello,

you can use a combination of bcftools +fixploidy and +fill-AN-AC

The fixploidy plugin needs at least a file with the sex information. It's just a text file which contain one line per sample with the sample name and the sex, e.g.

Sample_1 M
Sample_2 F

It than needs a file with regions where the ploidy should be fixed. The default looks like this:

#CHROM FROM TO SEX PLOIDY
 X 1 60000 M 1
 X 2699521 154931043 M 1
 Y 1 59373566 M 1
 Y 1 59373566 F 0
 MT 1 16569 M 1
 MT 1 16569 F 1

If this default is fine for you, you don't need to create an extra file.

Run the program like this:

$ bcftools +fixploidy input.vcf -- -s sex.txt -p ploidy.txt|bcftools +fill-AN-AC > output.vcf

fin swimmer

ADD COMMENT

Login before adding your answer.

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