Remove the `*` ALT Allele Reporting From a g.vcf Before (or After) Genotyping
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- bioinformatics, cli
Research direction
Start with the reported bcftools merge and bcftools query commands and the provided trio examples. Determine whether removing '' ALT alleles can preserve phased genotypes and upstream deletion information, then verify the behavior on both pre-genotyped gVCFs and genotyped VCFs. Done means a documented or implemented workflow that avoids downstream '' errors without losing relevant phasing.
Written by the indexing model from the issue text.
Description
I have a large scale dataset of WXS .g.vcfs , I do not have the original FASTA files. I would like to genotype these .g.vcfs into vcfs. These vcfs will be used in downstream applications. The issue is that the g.vcfs were created with GATK HaplotypeCaller without the "--disable-spanning-event-genotyping" flag set to true. This means that * SNPs are introduced so that there is a reported "SNP" at a specific site that an upstream INDEL is spanning (INDEL overlapping a SNP) . This is an issue because I am not interested in * genotypes - my understanding is that this information is already stored in the upstream deletion - and the * are not standard IUPAC base annotation and thus triggers errors in many downstream applications.
What is the correct way to get rid of the reporting to these * ALT alleles?
Looking at bcftools merge I noted the -m ** flag, so I tried this first on the VCF after genotyping:
./bcftools merge **-m none,\*\*** --force-single Genotyped_Sample.vcf.gz -Oz -o merged_Genotyped_Sample.vcf.gz
and then on the original, pre-genotyped g.vcf:
./bcftools merge **-m none,\*\*** --force-single Sample.g.vcf.gz -Oz -o merged_Sample.g.vcf.gz
Neither successfully remove the * ALT alleles.....
WHY DONT YOU JUST REMOVE THE SNPS WITH THE * ALT ALLELE?
The only reason I am hesitant to just remove these variants with grep or awk or something is because I am actually working with sequenced trio, which reports variant phasing information. What I noticed with this data is that after I extract a single subject from the trio vcf (which contains 3 subjects, mother, father and child), I have instances where * ALT variants are present, but the phasing information seems to suggest that they are on the allele opposite of the upstream INDEL. Here is an example - starting with variants in trio VCF:
#CHROM POS REF ALT
chr1 154590147 CCG C
chr1 154590148 CG C
chr1 154590149 G *
chr1 154590149 G C
and then, when I just extract a single subject bcftools query:
#CHROM POS REF ALT GT
chr1 154590148 CG C 0|1
chr1 154590149 G * 1|0
chr1 154590149 G C 0|1
maybe I can just delete these SNPs, because the * annotation was not build with phasing in mind and this is just an artifact.
- Dominant language
- C
- Stars
- 891
- Forks
- 277
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samtools/bcftools
-
needs-feedback
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
htslib-dependent P2: Desirable
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
needs-feedback requires-test-case
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in samtools/bcftools
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100