pub struct Genotype {
pub alleles: Vec<Option<i32>>,
pub phase: Vec<bool>,
}Expand description
Represents a parsed genotype for a single sample.
The alleles array contains allele indices (0 = REF, 1+ = ALT),
with null representing missing alleles (. in VCF notation).
The phase array indicates the phase separator between consecutive alleles:
false= unphased (/)true= phased (|)
Fields§
§alleles: Vec<Option<i32>>Allele indices. null represents a missing allele (.).
phase: Vec<bool>Phase separators. phase[i] indicates whether alleles[i+1] is phased
with alleles[i] (true = |, false = /).
Trait Implementations§
Source§impl FromNapiValue for Genotype
impl FromNapiValue for Genotype
Source§unsafe fn from_napi_value(
env: napi_env,
napi_val: napi_value,
) -> Result<Genotype>
unsafe fn from_napi_value( env: napi_env, napi_val: napi_value, ) -> Result<Genotype>
Safety Read more
fn from_unknown(value: Unknown<'_>) -> Result<Self, Error>
Source§impl ToNapiValue for Genotype
impl ToNapiValue for Genotype
Source§unsafe fn to_napi_value(env: napi_env, val: Genotype) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Genotype) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Auto Trait Implementations§
impl Freeze for Genotype
impl RefUnwindSafe for Genotype
impl Send for Genotype
impl Sync for Genotype
impl Unpin for Genotype
impl UnwindSafe for Genotype
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more