pub struct GoAnnotation { /* private fields */ }Expand description
A collection of GO term annotations.
Implementations§
Source§impl GoAnnotation
impl GoAnnotation
Sourcepub fn from_entries(
entries: &[(usize, &str, &str, GoNamespace)],
) -> Result<Self>
pub fn from_entries( entries: &[(usize, &str, &str, GoNamespace)], ) -> Result<Self>
Build from per-gene annotation entries, merging rows with the same term ID.
Each entry is (gene_index, term_id, term_name, namespace), mirroring the
one-row-per-annotation structure of GAF files.
Sourcepub fn terms_for_gene(&self, gene: usize) -> Vec<&str>
pub fn terms_for_gene(&self, gene: usize) -> Vec<&str>
Return all term IDs that annotate a given gene.
Sourcepub fn filter_namespace(&self, ns: GoNamespace) -> Result<Self>
pub fn filter_namespace(&self, ns: GoNamespace) -> Result<Self>
Filter to a single namespace, returning a new GoAnnotation.
Trait Implementations§
Source§impl Clone for GoAnnotation
impl Clone for GoAnnotation
Source§fn clone(&self) -> GoAnnotation
fn clone(&self) -> GoAnnotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GoAnnotation
impl RefUnwindSafe for GoAnnotation
impl Send for GoAnnotation
impl Sync for GoAnnotation
impl Unpin for GoAnnotation
impl UnsafeUnpin for GoAnnotation
impl UnwindSafe for GoAnnotation
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