pub struct BED<const N: u8> {
pub name: Option<String>,
pub score: Option<Score>,
pub strand: Option<Strand>,
pub optional_fields: OptionalFields,
/* private fields */
}Expand description
A standard BED record.
Fields§
§name: Option<String>§score: Option<Score>§strand: Option<Strand>§optional_fields: OptionalFieldsImplementations§
Trait Implementations§
Source§impl<const N: u8> BEDLike for BED<N>
impl<const N: u8> BEDLike for BED<N>
Source§fn set_start(&mut self, start: u64) -> &mut Self
fn set_start(&mut self, start: u64) -> &mut Self
Change the 0-based start position of the record
Source§fn set_end(&mut self, end: u64) -> &mut Self
fn set_end(&mut self, end: u64) -> &mut Self
Change the end position (non-inclusive) of the record
Source§fn len(&self) -> u64
fn len(&self) -> u64
Return the length of the record. Return 0 if the end position is smaller
than the start position.
fn compare(&self, other: &Self) -> Ordering
Source§fn n_overlap<B: BEDLike>(&self, other: &B) -> u64
fn n_overlap<B: BEDLike>(&self, other: &B) -> u64
Return the size of overlap between two records
Source§fn to_genomic_range(&self) -> GenomicRange
fn to_genomic_range(&self) -> GenomicRange
Convert the record to a
GenomicRangeSource§fn split_by_len(&self, bin_size: u64) -> impl Iterator<Item = GenomicRange>
fn split_by_len(&self, bin_size: u64) -> impl Iterator<Item = GenomicRange>
Split into consecutive records with the specified length. The length of
the last record may be shorter.
Source§fn rsplit_by_len(&self, bin_size: u64) -> impl Iterator<Item = GenomicRange>
fn rsplit_by_len(&self, bin_size: u64) -> impl Iterator<Item = GenomicRange>
Split into consecutive records with the specified length starting from the end.
The result is in reverse order compared to
split_by_len. The length of the last
record may be shorter.Source§impl<'__de, const N: u8, __Context> BorrowDecode<'__de, __Context> for BED<N>
impl<'__de, const N: u8, __Context> BorrowDecode<'__de, __Context> for BED<N>
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
impl<const N: u8> Eq for BED<N>
impl<const N: u8> StructuralPartialEq for BED<N>
Auto Trait Implementations§
impl<const N: u8> Freeze for BED<N>
impl<const N: u8> RefUnwindSafe for BED<N>
impl<const N: u8> Send for BED<N>
impl<const N: u8> Sync for BED<N>
impl<const N: u8> Unpin for BED<N>
impl<const N: u8> UnwindSafe for BED<N>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more