Convert haploid to homozygous diploid
0
0
Entering edit mode
5.1 years ago
biogirl ▴ 210

Hi,

Hoping someone can sanity check my idea.

I’m working on a haploid genome and called SNPs. I want to calculate genome-wise Tajima’s D (I’m sliding windows) using vcftools, but this only works on diploid SNP calls.

If I were to re-call my SNPs in diploid mode, then my SNPs should come up as homozygous diploid, yes? And then I can run vcftools Tajima’s D.

I know there are a few R based tools to do Tajima’s D on haploid data but I’ve had no luck with them and figured I’d try this way instead. Can anyone see any obvious problems?

Thanks, have a good weekend.

snp • 1.9k views
ADD COMMENT
0
Entering edit mode

Do you have the bams? If so, you can call bcftools with the -S, --samples-file FILE option and specify ploidy.

ADD REPLY
0
Entering edit mode

Yeah I have the BAMs, I was considering recalling the SNPs in diploid mode (with gatk). I'm a little confused how --samples-file would help in this situation though, can you expand please?

ADD REPLY
1
Entering edit mode

Great then! What you can do is to recall your variant using bcftools call and specify the option "-S, --samples-file FILE" which does: "File of sample names to include or exclude if prefixed with "^". One sample per line. See also the note above for the -s, --samples option. The sample order is updated to reflect that given in the input file. The command bcftools call accepts an optional second column indicating ploidy (0, 1 or 2) or sex (as defined by --ploidy, for example "F" or "M"), and can parse also PED files. If the second column is not present, the sex "F" is assumed. With bcftools call -C trio, PED file is expected." source "http://www.htslib.org/doc/bcftools.html"

So you could say that your samples are haploid and recall usiing bcftools call. Regarding the other parameters, one would need to check which ones suit your specific problem.

Hope this helps!

ADD REPLY

Login before adding your answer.

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