noodles_vcf::variant::record

Trait Record

Source
pub trait Record {
    // Required methods
    fn reference_sequence_name<'a, 'h: 'a>(
        &'a self,
        header: &'h Header,
    ) -> Result<&'a str>;
    fn variant_start(&self) -> Option<Result<Position>>;
    fn ids(&self) -> Box<dyn Ids + '_>;
    fn reference_bases(&self) -> Box<dyn ReferenceBases + '_>;
    fn alternate_bases(&self) -> Box<dyn AlternateBases + '_>;
    fn quality_score(&self) -> Option<Result<f32>>;
    fn filters(&self) -> Box<dyn Filters + '_>;
    fn info(&self) -> Box<dyn Info + '_>;
    fn samples(&self) -> Result<Box<dyn Samples + '_>>;

    // Provided methods
    fn variant_span(&self, header: &Header) -> Result<usize> { ... }
    fn variant_end(&self, header: &Header) -> Result<Position> { ... }
}
Expand description

A variant record.

Required Methods§

Source

fn reference_sequence_name<'a, 'h: 'a>( &'a self, header: &'h Header, ) -> Result<&'a str>

Returns the reference sequence name.

Source

fn variant_start(&self) -> Option<Result<Position>>

Returns the variant start position.

This position is 1-based, inclusive.

Source

fn ids(&self) -> Box<dyn Ids + '_>

Returns the IDs.

Source

fn reference_bases(&self) -> Box<dyn ReferenceBases + '_>

Returns the reference bases.

Source

fn alternate_bases(&self) -> Box<dyn AlternateBases + '_>

Returns the alternate bases.

Source

fn quality_score(&self) -> Option<Result<f32>>

Returns the quality scores.

Source

fn filters(&self) -> Box<dyn Filters + '_>

Returns the filters.

Source

fn info(&self) -> Box<dyn Info + '_>

Return the info fields.

Source

fn samples(&self) -> Result<Box<dyn Samples + '_>>

Returns the samples.

Provided Methods§

Source

fn variant_span(&self, header: &Header) -> Result<usize>

Returns the variant span.

Source

fn variant_end(&self, header: &Header) -> Result<Position>

Returns or calculates the variant end position.

If available, this returns the value of the END INFO field. Otherwise, it is calculated using the variant start position and reference bases length.

This position is 1-based, inclusive.

Implementors§