Skip to main content

VariantProjector

Struct VariantProjector 

Source
pub struct VariantProjector<P: ReferenceProvider + Clone> { /* private fields */ }

Implementations§

Source§

impl<P: ReferenceProvider + Clone> VariantProjector<P>

Source

pub fn new(projector: Projector, provider: P) -> Self

Source

pub fn with_normalize_config(self, config: NormalizeConfig) -> Self

Source

pub fn project( &self, hgvs_string: &str, transcript_id: &str, ) -> Result<VariantProjection, FerroError>

Parse, normalize, and project an HGVS string onto a transcript.

Source

pub fn project_variant( &self, variant: &HgvsVariant, transcript_id: &str, ) -> Result<VariantProjection, FerroError>

Normalize and project an already-parsed g. variant onto a transcript.

The variant is normalized first; for pre-normalized variants use [project_normalized] to skip the redundant normalization step.

Source

pub fn project_normalized( &self, variant: &HgvsVariant, transcript_id: &str, ) -> Result<VariantProjection, FerroError>

Project an already-normalized g. variant onto a transcript, skipping the normalization step.

Callers that pre-normalize once and then project against many transcripts should use this method to avoid the cost of re-normalization.

Warning: passing a non-normalized variant will produce coordinates that are technically valid but may not match other tools’ canonical form.

Source

pub fn project_all( &self, hgvs_string: &str, ) -> Result<Vec<VariantProjection>, FerroError>

Parse, normalize, and project an HGVS string onto ALL overlapping transcripts, returning results in clinical priority order (MANE Select first, then Plus Clinical, then canonical, then longest CDS).

Returns an empty Vec when the variant overlaps no known transcripts. Individual transcript errors are logged at trace level and silently skipped so that a single bad transcript does not abort the whole call.

Source

pub fn project_variant_all( &self, variant: &HgvsVariant, ) -> Result<Vec<VariantProjection>, FerroError>

Normalize and project an already-parsed g. variant onto ALL overlapping transcripts.

See [project_all] for ordering and error-handling semantics.

Source

pub fn project_normalized_all( &self, variant: &HgvsVariant, ) -> Result<Vec<VariantProjection>, FerroError>

Project an already-normalized g. variant onto ALL overlapping transcripts, skipping re-normalization.

Callers that pre-normalize once and then fan-out across transcripts should use this method.

Auto Trait Implementations§

§

impl<P> Freeze for VariantProjector<P>
where P: Freeze,

§

impl<P> RefUnwindSafe for VariantProjector<P>
where P: RefUnwindSafe,

§

impl<P> Send for VariantProjector<P>
where P: Send,

§

impl<P> Sync for VariantProjector<P>
where P: Sync,

§

impl<P> Unpin for VariantProjector<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for VariantProjector<P>
where P: UnsafeUnpin,

§

impl<P> UnwindSafe for VariantProjector<P>
where P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more