pub struct VariantAnnotationEngine {}Expand description
The class responsible for computing annotations for variants. Annotations are auto-discovered - ie, any class that extends {@link VariantAnnotation} and lives in this package is treated as an annotation and the engine will attempt to create instances of it by calling the non-arg constructor (loading will fail if there is no no-arg constructor).
Implementations§
Source§impl VariantAnnotationEngine
impl VariantAnnotationEngine
Sourcepub fn annotate_context<A: Allele>(
vc: &VariantContext,
read_likelihoods: &mut AlleleLikelihoods<A>,
add_annotation: Box<dyn Fn(&Annotation) -> bool>,
) -> VariantContext
pub fn annotate_context<A: Allele>( vc: &VariantContext, read_likelihoods: &mut AlleleLikelihoods<A>, add_annotation: Box<dyn Fn(&Annotation) -> bool>, ) -> VariantContext
Annotates the given variant context - adds all annotations that satisfy the predicate. NOTE: Due to trait impl limitations. read_likelihoods should be marginalized over the alleles in vc BEFORE being passed to this function. GATK HaplotypeCaller Marginalizes inside function, but this is not possible with current setup as it we want general functions :) @param vc the variant context to annotate @param features context containing the features that overlap the given variant @param ref the reference context of the variant to annotate or null if there is none @param readLikelihoods readLikelihoods indexed by sample, allele, and read within sample. May be null @param addAnnot function that indicates if the given annotation type should be added to the variant
Sourcepub fn vc_annotations() -> Vec<Annotation>
pub fn vc_annotations() -> Vec<Annotation>
Annotations added to the VariantContext
Sourcepub fn genotype_annotations() -> Vec<Annotation>
pub fn genotype_annotations() -> Vec<Annotation>
Annotations added to the Genotype of VariantContexts
Sourcepub fn precalculated_annotations() -> Vec<Annotation>
pub fn precalculated_annotations() -> Vec<Annotation>
Annotations that are precalculated or calculated through other annotations
Sourcepub fn populate_vcf_header(header: &mut Header, strain_info: bool)
pub fn populate_vcf_header(header: &mut Header, strain_info: bool)
Populates a given VCF header with all possible annotation fields and info
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VariantAnnotationEngine
impl RefUnwindSafe for VariantAnnotationEngine
impl Send for VariantAnnotationEngine
impl Sync for VariantAnnotationEngine
impl Unpin for VariantAnnotationEngine
impl UnwindSafe for VariantAnnotationEngine
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.