Struct noodles::vcf::record::Genotype[][src]

pub struct Genotype(_);
Expand description

A VCF record genotype.

Implementations

Parses a raw genotype for the given genotype format.

Examples

use std::convert::TryFrom;
use noodles_vcf::record::{genotype::{field::{Key, Value}, Field}, Genotype};

let format = "GT:GQ".parse()?;

assert_eq!(
    Genotype::from_str_format("0|0:13", &format),
    Ok(Genotype::try_from(vec![
        Field::new(Key::Genotype, Some(Value::String(String::from("0|0")))),
        Field::new(Key::ConditionalGenotypeQuality, Some(Value::Integer(13))),
    ])?)
);

Methods from Deref<Target = IndexMap<Key, Field, RandomState>>

Computes in O(1) time.

Return a reference to the map’s BuildHasher.

Return the number of key-value pairs in the map.

Computes in O(1) time.

Returns true if the map contains no elements.

Computes in O(1) time.

Return an iterator over the key-value pairs of the map, in their order

Return an iterator over the keys of the map, in their order

Return an iterator over the values of the map, in their order

Return true if an equivalent to key exists in the map.

Computes in O(1) time (average).

Return a reference to the value stored for key, if it is present, else None.

Computes in O(1) time (average).

Return references to the key-value pair stored for key, if it is present, else None.

Computes in O(1) time (average).

Return item index, key and value

Return item index, if it exists in the map

Computes in O(1) time (average).

Get a key-value pair by index

Valid indices are 0 <= index < self.len()

Computes in O(1) time.

Get the first key-value pair

Computes in O(1) time.

Get the last key-value pair

Computes in O(1) time.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.