pub struct ReadObservationBuilder<P, A>where
P: Clone,
A: Clone,
{ /* private fields */ }
Expand description

Builder for ReadObservation.

Implementations§

source§

impl<P, A> ReadObservationBuilder<P, A>where
P: Clone + Clone,
A: Clone + Clone,

source

pub fn name(&mut self, value: Option<String>) -> &mut Self

source

pub fn fragment_id(&mut self, value: Option<u64>) -> &mut Self

source

pub fn prob_mapping(&mut self, value: LogProb) -> &mut Self

Posterior probability that the read/read-pair has been mapped correctly (1 - MAPQ).

source

pub fn prob_mismapping(&mut self, value: LogProb) -> &mut Self

Posterior probability that the read/read-pair has been mapped incorrectly (MAPQ).

source

pub fn prob_alt(&mut self, value: LogProb) -> &mut Self

Probability that the read/read-pair comes from the alternative allele.

source

pub fn prob_ref(&mut self, value: LogProb) -> &mut Self

Probability that the read/read-pair comes from the reference allele.

source

pub fn prob_missed_allele(&mut self, value: LogProb) -> &mut Self

Probability that the read/read-pair comes from an unknown allele at an unknown true locus (in case it is mismapped). This should usually be set as the product of the maxima of prob_ref and prob_alt per read.

source

pub fn prob_sample_alt(&mut self, value: LogProb) -> &mut Self

Probability to sample the alt allele

source

pub fn prob_hit_base(&mut self, value: LogProb) -> &mut Self

source

pub fn strand(&mut self, value: Strand) -> &mut Self

Strand evidence this observation relies on

source

pub fn read_orientation(
&mut self,
value: SequenceReadPairOrientation
) -> &mut Self

Read orientation support this observation relies on

source

pub fn softclipped(&mut self, value: bool) -> &mut Self

True if obervation contains s

source

pub fn paired(&mut self, value: bool) -> &mut Self

source

pub fn read_position(&mut self, value: P) -> &mut Self

Read position of the variant in the read (for SNV and MNV)

source

pub fn prob_observable_at_homopolymer_artifact(
&mut self,
value: Option<LogProb>
) -> &mut Self

Probability to make this observation at a homopolymer artifact

source

pub fn prob_observable_at_homopolymer_variant(
&mut self,
value: Option<LogProb>
) -> &mut Self

source

pub fn homopolymer_indel_len(&mut self, value: Option<i8>) -> &mut Self

Homopolymer indel length (None if there is no homopolymer indel compared to reference)

source

pub fn is_max_mapq(&mut self, value: bool) -> &mut Self

source

pub fn alt_locus(&mut self, value: A) -> &mut Self

source

pub fn build(
&self
) -> Result<ReadObservation<P, A>, ReadObservationBuilderError>

Builds a new ReadObservation.

Errors

If a required field has not been initialized.

source§

impl<P: Clone, A: Clone> ReadObservationBuilder<P, A>

source

pub fn prob_mapping_mismapping(&mut self, prob_mapping: LogProb) -> &mut Self

source

pub fn prob_overlap(&mut self, prob_double_overlap: LogProb) -> &mut Self

Trait Implementations§

source§

impl<P, A> Clone for ReadObservationBuilder<P, A>where
P: Clone + Clone,
A: Clone + Clone,

source§

fn clone(&self) -> ReadObservationBuilder<P, A>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<P, A> Default for ReadObservationBuilder<P, A>where
P: Clone + Clone,
A: Clone + Clone,

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<P, A> RefUnwindSafe for ReadObservationBuilder<P, A>where
A: RefUnwindSafe,
P: RefUnwindSafe,

§

impl<P, A> Send for ReadObservationBuilder<P, A>where
A: Send,
P: Send,

§

impl<P, A> Sync for ReadObservationBuilder<P, A>where
A: Sync,
P: Sync,

§

impl<P, A> Unpin for ReadObservationBuilder<P, A>where
A: Unpin,
P: Unpin,

§

impl<P, A> UnwindSafe for ReadObservationBuilder<P, A>where
A: UnwindSafe,
P: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere
T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,

§

fn vzip(self) -> V