After parsing a variant's haplotypes, I want to additionally store ref/alt label (ie call major_allele and minor_allele), but I get Error: minor_allele_dosage!() must be called before minor_allele(). But calling minor_allele_dosage!() throws another error.
MWE
using BGEN
b = Bgen(BGEN.datadir("haplotypes.bgen"))
variants = parse_variants(b; from_bgen_start=true)
v = variants[1]
dose = probabilities!(b, v) # I will parse `dose` using some other routine to get haplotypes
julia> major_allele(v) # now try to get REF allele
┌ Error: `minor_allele_dosage!()` must be called before `minor_allele()`
└ @ BGEN ~/.julia/dev/BGEN/src/variant.jl:92
Try calling minor_allele_dosage!() throws not phased error
I think I'm running into the same problem as #7.
After parsing a variant's haplotypes, I want to additionally store ref/alt label (ie call
major_allele
andminor_allele
), but I getError: minor_allele_dosage!() must be called before minor_allele()
. But callingminor_allele_dosage!()
throws another error.MWE
Try calling
minor_allele_dosage!()
throws not phased errorbut variant is phased:
Here is another test data (VCF haplotypes converted to BGEN using qctools v2) Archive.zip