Comments (2)
Thanks, I had to be a little bit more precise there.
"On the other hand, if the data are phased, probabilities!(b, v)[i, j]
represents the probability that haplotype (i - 1) รท n_alleles + 1
has allele (i - 1) % n_alleles + 1
for sample j
, where n_alleles
is the number of alleles."
For example:
b2 = Bgen(BGEN.datadir("complex.bgen"))
vs = parse_variants(b2)
p = probabilities!(b2, vs[3])
4ร4 Array{Float64,2}:
1.0 0.0 1.0 1.0
0.0 1.0 0.0 0.0
NaN 0.0 1.0 0.0
NaN 1.0 0.0 1.0
This variant has two possible alleles (allele 1: "A" and allele 2: "G"), and the all the samples are dipoids except for the first one, which is monoploid.
It corresponds to a line of VCF file:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample_0 sample_1 sample_2 sample_3
01 3 V3 A G . . . GT:HP 0:1,0 1|1:0,1,0,1 0|0:1,0,1,0 0|1:1,0,0,1
So the first sample is monoploid of A, the second sample is homozygote A|A, the third sample is homozygote G|G, and the last sample is a heterozygote A|G (phased).
Does it make sense to you?
from bgen.jl.
Thank you very much. That helps tremendously.
from bgen.jl.
Related Issues (12)
- Cannot get ref/alt allele label for haplotype data HOT 2
- Read all ALT allele as 1 and REF allele as 0 in `minor_allele_dosage!`? HOT 1
- Always treat REF as `major_allele` and ALT as `minor_allele` HOT 2
- TagBot trigger issue HOT 13
- maf, hwe, info_score, counts! for general cases
- Individual ID extracted from wrong column HOT 2
- convert to called genotypes HOT 7
- minor_allele_dosage!'s outputs oscillates for some variants HOT 3
- Importing haplotypes.bgen throws assertion error HOT 1
- Feature request: import genotype/haplotypes into numeric matrix HOT 1
- Features to add HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bgen.jl.