Closed gwct closed 1 year ago
I can confirm there is some strange problem. With VCF none of the variant is applied, but when the VCF is converted to BCF, suddenly it works. Not sure at this stage if the problem is in htslib or in bcftools
This is caused by an undesired difference in VCF vs BCF seek, see https://github.com/samtools/htslib/issues/1623
Great, thanks. Glad it wasn't something silly I was doing. I went ahead with a different chromosome which worked for my case, but good to know I can just use BCF as well until the fix is merged. Thanks for looking in to this!
So, this is a weird one, which makes me think I'm doing something simple wrong and just can't see it.
I have a VCF that I've called SNPs on for only one scaffold (
19
). When I try to add these variants into the genome which contains all scaffolds withbcftools consensus
, it doesn't work, with none of the variants being applied:The
snippet.vcf.gz
file is just the first few lines of a larger VCF, but I get the exact same behavior with the full VCF. Here are the contents of the snippet:Now for the even weirder quirks:
19
(orX
orY
for some reason), it works.18
, the behavior is reversed: it works when all scaffolds are present and applies 0 variants if a remove a random one. I haven't tried with SNPs from any other scaffold.I'm at a loss figuring this one out. Is there something weird about my VCF file that I'm not seeing?? I generated it using HaplotypeCaller, and then did some filtering and selected only SNPs.
The reference genome I'm using is mouse mm39 (http://ftp.ensembl.org/pub/current_fasta/mus_musculus/dna/Mus_musculus.GRCm39.dna.primary_assembly.fa.gz), with only the full chromosomes though (1-19 + X and Y).
Any help would be appreciated, though ultimately I can just include 2 scaffolds in my simulations and it should work. Thanks!