FeatureProcessor

Struct FeatureProcessor 

Source
pub struct FeatureProcessor<Y: Clone + Default, I: IsotopicPatternGenerator, S: IsotopicPatternScorer, F: IsotopicFitFilter> {
    pub feature_map: IndexedFeatureMap<Y>,
    pub isotopic_model: I,
    pub scorer: S,
    pub fit_filter: F,
    pub scaling_method: TheoreticalIsotopicDistributionScalingMethod,
    pub prefer_multiply_charged: bool,
    pub minimum_size: usize,
    pub maximum_time_gap: f64,
    pub minimum_intensity: f32,
    /* private fields */
}

Fields§

§feature_map: IndexedFeatureMap<Y>§isotopic_model: I§scorer: S§fit_filter: F§scaling_method: TheoreticalIsotopicDistributionScalingMethod§prefer_multiply_charged: bool§minimum_size: usize§maximum_time_gap: f64§minimum_intensity: f32

Implementations§

Source§

impl<Y: Clone + Default, I: IsotopicPatternGenerator, S: IsotopicPatternScorer, F: IsotopicFitFilter> FeatureProcessor<Y, I, S, F>

Source

pub fn new( feature_map: FeatureMap<MZ, Y, Feature<MZ, Y>>, isotopic_model: I, scorer: S, fit_filter: F, minimum_size: usize, maximum_time_gap: f64, minimum_intensity: f32, prefer_multiply_charged: bool, ) -> Self

Source

pub fn builder() -> FeatureProcessorBuilder<Y, I, S, F>

Source

pub fn finalize_fit( &mut self, fit: &FeatureSetFit, detection_threshold: f32, max_missed_peaks: usize, ) -> DeconvolvedSolutionFeature<Y>

Source

pub fn deconvolve( &mut self, error_tolerance: Tolerance, charge_range: ChargeRange, left_search_limit: i8, right_search_limit: i8, search_params: &FeatureSearchParams, convergence: f32, max_iterations: u32, ) -> Result<FeatureMap<Mass, Y, DeconvolvedSolutionFeature<Y>>, DeconvolutionError>

Trait Implementations§

Source§

impl<Y: Debug + Clone + Default, I: Debug + IsotopicPatternGenerator, S: Debug + IsotopicPatternScorer, F: Debug + IsotopicFitFilter> Debug for FeatureProcessor<Y, I, S, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Y: Clone + Default, I: IsotopicPatternGenerator, S: IsotopicPatternScorer, F: IsotopicFitFilter> FeatureIsotopicFitter<Y> for FeatureProcessor<Y, I, S, F>

Source§

fn make_isotopic_pattern( &mut self, mz: f64, charge: i32, search_params: &FeatureSearchParams, ) -> TheoreticalIsotopicPattern

Source§

fn fit_theoretical_distribution_on_features( &self, mz: f64, error_tolerance: Tolerance, charge: i32, base_tid: TheoreticalIsotopicPattern, max_missed_peaks: usize, threshold_scale: f32, feature: &Option<CoordinateRange<Y>>, ) -> Vec<FeatureSetFit>

Source§

fn fit_theoretical_distribution( &mut self, feature: usize, error_tolerance: Tolerance, charge: i32, left_search: i8, right_search: i8, search_params: &FeatureSearchParams, ) -> Vec<FeatureSetFit>

Source§

fn fit_feature_set( &mut self, mz: f64, error_tolerance: Tolerance, charge: i32, search_params: &FeatureSearchParams, feature: &Option<CoordinateRange<Y>>, ) -> Vec<FeatureSetFit>

Source§

impl<Y: Clone + Default, I: IsotopicPatternGenerator, S: IsotopicPatternScorer, F: IsotopicFitFilter> FeatureMapMatch<Y> for FeatureProcessor<Y, I, S, F>

Source§

fn feature_map(&self) -> &IndexedFeatureMap<Y>

Source§

fn feature_map_mut(&mut self) -> &mut IndexedFeatureMap<Y>

Source§

fn find_all_features( &self, mz: f64, error_tolerance: Tolerance, ) -> Vec<(usize, &IndexedFeature<Y>)>

Source§

fn find_features( &self, mz: f64, error_tolerance: Tolerance, interval: &Option<CoordinateRange<Y>>, ) -> Option<Vec<(usize, &IndexedFeature<Y>)>>

Source§

fn match_theoretical_isotopic_distribution( &self, theoretical_distribution: &TheoreticalIsotopicPattern, error_tolerance: Tolerance, interval: &Option<CoordinateRange<Y>>, ) -> Vec<Option<Vec<(usize, &'_ IndexedFeature<Y>)>>>

Source§

impl<Y: Clone + Default, I: IsotopicPatternGenerator, S: IsotopicPatternScorer, F: IsotopicFitFilter> GraphFeatureDeconvolution<Y> for FeatureProcessor<Y, I, S, F>

Source§

fn score_interpretation(&self) -> ScoreInterpretation

Source§

fn add_fit_to_graph(&mut self, fit: FeatureSetFit)

Source§

fn prefer_multiply_charged(&self) -> bool

Source§

fn skip_feature(&self, feature: &IndexedFeature<Y>) -> bool

Source§

fn dependency_graph_mut(&mut self) -> &mut FeatureDependenceGraph

Source§

fn populate_graph( &mut self, error_tolerance: Tolerance, charge_range: ChargeRange, left_search: i8, right_search: i8, search_params: &FeatureSearchParams, ) -> usize

Source§

fn explore_local<Z: ChargeIterator>( &mut self, feature: usize, error_tolerance: Tolerance, charge_range: Z, left_search: i8, right_search: i8, search_params: &FeatureSearchParams, ) -> usize

Source§

fn collect_all_fits<Z: ChargeIterator>( &mut self, feature: usize, error_tolerance: Tolerance, charge_range: Z, left_search: i8, right_search: i8, search_params: &FeatureSearchParams, ) -> usize

Source§

fn solve_subgraph_top( &mut self, cluster: DependenceCluster, fits: Vec<(FitRef, FeatureSetFit)>, fit_accumulator: &mut Vec<FeatureSetFit>, ) -> Result<(), DeconvolutionError>

Source§

fn select_best_disjoint_subgraphs( &mut self, fit_accumulator: &mut Vec<FeatureSetFit>, ) -> Result<(), DeconvolutionError>

Source§

fn graph_step_deconvolve( &mut self, error_tolerance: Tolerance, charge_range: ChargeRange, left_search: i8, right_search: i8, search_params: &FeatureSearchParams, ) -> Result<GraphStepResult, DeconvolutionError>

Auto Trait Implementations§

§

impl<Y, I, S, F> Freeze for FeatureProcessor<Y, I, S, F>
where I: Freeze, S: Freeze, F: Freeze,

§

impl<Y, I, S, F> RefUnwindSafe for FeatureProcessor<Y, I, S, F>

§

impl<Y, I, S, F> Send for FeatureProcessor<Y, I, S, F>
where I: Send, S: Send, F: Send, Y: Send,

§

impl<Y, I, S, F> Sync for FeatureProcessor<Y, I, S, F>
where I: Sync, S: Sync, F: Sync, Y: Sync,

§

impl<Y, I, S, F> Unpin for FeatureProcessor<Y, I, S, F>
where I: Unpin, S: Unpin, F: Unpin, Y: Unpin,

§

impl<Y, I, S, F> UnwindSafe for FeatureProcessor<Y, I, S, F>

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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