DecodeGenetics / graphtyper

Population-scale genotyping using pangenome graphs
http://dx.doi.org/10.1038/ng.3964
MIT License
162 stars 20 forks source link

genotype wrong #141

Open lihaicheng7003 opened 8 months ago

lihaicheng7003 commented 8 months ago
./graphtyper genotype ~/data1/References/human/bowen/Homo_sapiens_assembly38.fasta --sam=NA12878/alignment/NA12878.alt_bwamem_GRCh38DH.20150718.CEU.low_coverage.bam --region=chr21 --threads=40  --prior_vcf=~/data1/References/human/dbsnp/dbsnp138/Homo_sapiens_assembly38.dbsnp138.vcf.gz  

I encountered an error, and I don't know how to solve it, constructor.cpp:1248 Found an SV in a non-SV graph at chr21:4395500

lihaicheng7003 commented 8 months ago

I extracted chr21 from ~/data1/References/human/dbsnp/dbsnp138/Homo_sapiens_assembly38.dbsnp138.vcf.gz

bcftools view Homo_sapiens_assembly38.dbsnp138.vcf.gz chr chr21 > Homo_sapiens_assembly38.dbsnp138.chr21.vcf

Re-run, successful, and the time is much faster than the entire dbsnp

./graphtyper genotype ~/data1/References/human/bowen/Homo_sapiens_assembly38.fasta --sam=NA12878/alignment/NA12878.alt_bwamem_GRCh38DH.20150718.CEU.low_coverage.bam --region=chr21 --threads=40  --prior_vcf=~/data1/References/human/bowen/GATKResourceBundle/Homo_sapiens_assembly38.dbsnp138.chr21.vcf  --output=~/data1/project19/results_dpsnp138_chr21
lihaicheng7003 commented 8 months ago

So I'm a little confused. If dbsnp is introduced into the entire genome, will mutations in other chromosomes affect chr21?

hannespetur commented 7 months ago

Hey,

Let me first say that --prior_vcf is typically not used. If it has too many nearby variants it will create a lot of graph paths which can make the mappings very ambigous and make the variant calling worse.

As for the error, please check how the VCF records look like at chr21:4395500. It could be malformed in some way.

For the chr21 rerun, you should add -Oz to the command to recompress the VCF and then tabix index it. I suspect reading the VCF is failing and graphtyper is genotyping as if it did not get any prior variants.

Best, Hannes

lihaicheng7003 commented 7 months ago

Thanks for the reply, I will check again and reply later.