how to extract variants from the vcf.gz files linked below?
1
0
Entering edit mode
9 weeks ago
Mahad • 0

I have tried several commands to extract the variant (non-homozygous) genotype from the two vcf.gz files found below, but no variant genotypes are coming up. The output for the commands below areal 0, with no variant information under the columns of the outputted vcf data. Does anyone know how to properly extract all variant genotypes (1/0, 0/1,11)?

  1. remove homozygous ref genotype from multi-sample vcf

-bcftools view -i 'GT[*]="alt"' LUD.TH179.PASS.dbsnp_cosmic.vcf.gz | less -SN

2.extracting heterozygous snp from a vcf file

  • vcftools --gzvcf LUD.TH179.PASS.dbsnp_cosmic.vcf.gz --extract-FORMAT-info GT | grep "0/1"
  1. ID heterozygous variants in VCF file using vcftools
  • vcftools --gzvcf LUD.TH179.PASS.dbsnp_cosmic.vcf.gz --het
  • output(cat out.het)
    • INDV O(HOM) E(HOM) N_SITES F (EMPTY)

vcf files: (https://zenodo.org/records/6558593, LUD.TH179.PASS.dbsnp_cosmic.vcf.gz and LUD.TH238.PASS.dbsnp_cosmic.vcf.gz).

vcftools bcf vcf bcftools • 432 views
ADD COMMENT
0
Entering edit mode
9 weeks ago
DBScan ▴ 300

If you have single sample VCFs, you could exclude hom-ref sites with this command:

bcftools view -e 'GT="ref"'
ADD COMMENT
0
Entering edit mode

Thank you, if you try to do it on the files provided, do you see any variant alleles?

ADD REPLY
0
Entering edit mode

I'm not familiar with scAllele, but I think LUD.TH179.PASS.dbsnp_cosmic.vcf.gz is some kind of annotation VCF that is supposed to accompany the other vcf files in that directory. It does seem to be completely full of './.' GT calls?

ADD REPLY
0
Entering edit mode

thanks for confirming! I was assuming as such too

ADD REPLY

Login before adding your answer.

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