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: StringThe identifier of the DNA sequence this gene was found in.
start: i64The index of the leftmost nucleotide of the gene within the source sequence, independent of the strandedness.
end: i64The index of the rightmost nucleotide of the gene within the source sequence.
strand: StrandThe strand where the gene is located.
protein: ProteinThe protein translated from this gene.
qualifiers: BTreeMap<String, Vec<String>>Feature qualifiers added to the GenBank CDS feature built from
this Gene.
probability: Option<f64>Per-gene cluster probability override; if set, takes precedence over
per-domain probabilities when computing average_probability and
maximum_probability.
Implementations§
Source§impl Gene
impl Gene
Sourcepub fn average_probability(&self) -> Option<f64>
pub fn average_probability(&self) -> Option<f64>
The average of domain probabilities of being in a cluster.
Sourcepub fn maximum_probability(&self) -> Option<f64>
pub fn maximum_probability(&self) -> Option<f64>
The highest of domain probabilities of being in a cluster.
Sourcepub fn functions(&self) -> HashSet<String>
pub fn functions(&self) -> HashSet<String>
Predict the function(s) of the gene from its domain annotations.
Sourcepub fn with_protein(&self, protein: Protein) -> Gene
pub fn with_protein(&self, protein: Protein) -> Gene
Copy the current gene and assign it a different protein.
Sourcepub fn with_probability(&self, probability: f64) -> Gene
pub fn with_probability(&self, probability: f64) -> Gene
Copy the current gene and assign it a different probability.
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>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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