pub struct Gene {
pub source_id: String,
pub start: i64,
pub end: i64,
pub strand: Strand,
pub protein: Protein,
pub qualifiers: BTreeMap<String, Vec<String>>,
pub probability: Option<f64>,
}Expand description
A nucleotide sequence coding a protein.
Fields§
§source_id: StringSource sequence identifier.
start: i64Start coordinate within source (1-based, inclusive).
end: i64End coordinate within source (inclusive).
strand: Strand§protein: Protein§qualifiers: BTreeMap<String, Vec<String>>§probability: Option<f64>Override probability (takes precedence over domain-derived probability).
Implementations§
Source§impl Gene
impl Gene
pub fn id(&self) -> &str
Sourcepub fn average_probability(&self) -> Option<f64>
pub fn average_probability(&self) -> Option<f64>
Average of domain probabilities (or override if set).
Sourcepub fn maximum_probability(&self) -> Option<f64>
pub fn maximum_probability(&self) -> Option<f64>
Highest domain probability (or override if set).
pub fn with_protein(&self, protein: Protein) -> Gene
pub fn with_probability(&self, probability: f64) -> Gene
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Gene
impl<'de> Deserialize<'de> for Gene
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
Auto Trait Implementations§
impl Freeze for Gene
impl RefUnwindSafe for Gene
impl Send for Gene
impl Sync for Gene
impl Unpin for Gene
impl UnsafeUnpin for Gene
impl UnwindSafe for Gene
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