This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bcftoold guess ploidy

Hi, I am trying to use bcftools guess-ploidy to check gender.

This is how I tried to use it

bcftools view sample.vcf.gz -r chrX:2699521-154931043 | bcftools +guess-ploidy >guess_ploidy.output

The VCF has around 50 samples data from Whole Genome Sequencing and has data on all chromosomes.

However I am getting most of the output for samples not as expected. It cannot be wrong for most of the samples.

bcftools guess-ploidy

1 answer

We used plink --check-sex function to check gender in our dataset. I m not sure how bcftools guess-ploidy works though. If you would like to check gender using plink which is fairly simple, you can run like this-

plink --vcf sample.vcf.gz --check-sex

Thanks

I used to following command

plink --vcf cteph_49samples_jont_genotyped.ann.vep.vcf.gz --check-sex --const-fid
`

If I do not use const-fid, it was giving the error ``` Error: Multiple instances of '_' in sample ID. If you do not want '_' to be treated as a FID/IID delimiter, use --double-id or --const-fid to choose a different method of converting VCF sample IDs to PLINK IDs, or --id-delim to change the FID/IID delimiter.

However I am getting all of the samples listed as females. Should I run this command just on chrX and chrY ?

Running will all the chromosomes is usually not a problem in checking/determining the gender.

Log in to answer this question.