Question: Convert haploid to homozygous diploid
0
gravatar for biogirl
12 weeks ago by
biogirl190
European Union
biogirl190 wrote:

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 • 111 views
ADD COMMENTlink written 12 weeks ago by biogirl190

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

ADD REPLYlink written 12 weeks ago by Gabriel R.2.7k

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 REPLYlink written 12 weeks ago by biogirl190
1

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 REPLYlink written 12 weeks ago by Gabriel R.2.7k
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: 1351 users visited in the last hour