Trait bed_utils::bed::BEDLike

source ·
pub trait BEDLike {
Show 14 methods // Required methods fn chrom(&self) -> &str; fn set_chrom(&mut self, chrom: &str) -> &mut Self; fn start(&self) -> u64; fn set_start(&mut self, start: u64) -> &mut Self; fn end(&self) -> u64; fn set_end(&mut self, end: u64) -> &mut Self; // Provided methods fn name(&self) -> Option<&str> { ... } fn score(&self) -> Option<Score> { ... } fn strand(&self) -> Option<Strand> { ... } fn len(&self) -> u64 { ... } fn compare(&self, other: &Self) -> Ordering { ... } fn overlap<B: BEDLike>(&self, other: &B) -> Option<GenomicRange> { ... } fn n_overlap<B: BEDLike>(&self, other: &B) -> u64 { ... } fn to_genomic_range(&self) -> GenomicRange { ... }
}
Expand description

Common BED fields

Required Methods§

source

fn chrom(&self) -> &str

Return the chromosome name of the record

source

fn set_chrom(&mut self, chrom: &str) -> &mut Self

Change the chromosome name of the record

source

fn start(&self) -> u64

Return the 0-based start position of the record

source

fn set_start(&mut self, start: u64) -> &mut Self

Change the 0-based start position of the record

source

fn end(&self) -> u64

Return the end position (non-inclusive) of the record

source

fn set_end(&mut self, end: u64) -> &mut Self

Change the end position (non-inclusive) of the record

Provided Methods§

source

fn name(&self) -> Option<&str>

Return the name of the record

source

fn score(&self) -> Option<Score>

Return the score of the record

source

fn strand(&self) -> Option<Strand>

Return the strand of the record

source

fn len(&self) -> u64

Return the length of the record. Return 0 if the end position is smaller than the start position.

source

fn compare(&self, other: &Self) -> Ordering

source

fn overlap<B: BEDLike>(&self, other: &B) -> Option<GenomicRange>

Return the overlap

source

fn n_overlap<B: BEDLike>(&self, other: &B) -> u64

Return the size of overlap between two records

source

fn to_genomic_range(&self) -> GenomicRange

Convert the record to a GenomicRange

Object Safety§

This trait is not object safe.

Implementors§