pub struct VariantProjector<P: ReferenceProvider + Clone> { /* private fields */ }Implementations§
Source§impl<P: ReferenceProvider + Clone> VariantProjector<P>
impl<P: ReferenceProvider + Clone> VariantProjector<P>
pub fn new(projector: Projector, provider: P) -> Self
pub fn with_normalize_config(self, config: NormalizeConfig) -> Self
Sourcepub fn project(
&self,
hgvs_string: &str,
transcript_id: &str,
) -> Result<VariantProjection, FerroError>
pub fn project( &self, hgvs_string: &str, transcript_id: &str, ) -> Result<VariantProjection, FerroError>
Parse, normalize, and project an HGVS string onto a transcript.
Sourcepub fn project_variant(
&self,
variant: &HgvsVariant,
transcript_id: &str,
) -> Result<VariantProjection, FerroError>
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.
Sourcepub fn project_normalized(
&self,
variant: &HgvsVariant,
transcript_id: &str,
) -> Result<VariantProjection, FerroError>
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.
Sourcepub fn project_all(
&self,
hgvs_string: &str,
) -> Result<Vec<VariantProjection>, FerroError>
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.
Sourcepub fn project_variant_all(
&self,
variant: &HgvsVariant,
) -> Result<Vec<VariantProjection>, FerroError>
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.
Sourcepub fn project_normalized_all(
&self,
variant: &HgvsVariant,
) -> Result<Vec<VariantProjection>, FerroError>
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.