pub struct Contig {
pub name: String,
pub length: u64,
pub md5: Option<String>,
pub assembly: Option<String>,
pub uri: Option<String>,
pub species: Option<String>,
pub aliases: Vec<String>,
pub sequence_role: SequenceRole,
}Expand description
A single contig/sequence in a reference genome
Fields§
§name: StringSequence name (SN tag in SAM)
length: u64Sequence length (LN tag in SAM)
md5: Option<String>MD5 checksum of the sequence (M5 tag in SAM) Lowercase hex, 32 characters
assembly: Option<String>Assembly identifier (AS tag in SAM)
uri: Option<String>URI where sequence can be retrieved (UR tag in SAM)
species: Option<String>Species (SP tag in SAM)
aliases: Vec<String>Known alternative names for this contig
sequence_role: SequenceRoleSequence role from NCBI assembly report
Implementations§
Source§impl Contig
impl Contig
pub fn new(name: impl Into<String>, length: u64) -> Self
Sourcepub fn is_primary_chromosome(&self) -> bool
pub fn is_primary_chromosome(&self) -> bool
Check if this contig is a primary chromosome (1-22, X, Y) Matches both UCSC (chr1) and NCBI (1) naming conventions exactly
Sourcepub fn is_mitochondrial(&self) -> bool
pub fn is_mitochondrial(&self) -> bool
Check if this is a mitochondrial contig Matches common mitochondrial names from various reference builds
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Contig
impl<'de> Deserialize<'de> for Contig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Contig
impl StructuralPartialEq for Contig
Auto Trait Implementations§
impl Freeze for Contig
impl RefUnwindSafe for Contig
impl Send for Contig
impl Sync for Contig
impl Unpin for Contig
impl UnwindSafe for Contig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.