[−][src]Struct cgats::Cgats
Fields
vendor: Option<Vendor>
meta: DataVec
fields: Vec<Field>
data_map: BTreeMap<usize, Sample>
Methods
impl Cgats
[src]
pub fn new() -> Cgats
[src]
Create a new empty CGATS object
pub fn sample_count(&self) -> usize
[src]
Returns the number of samples in the data
pub fn new_with_vendor(vendor: Vendor) -> Cgats
[src]
Create a new empty CGATS object with a Vendor
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Cgats>
[src]
Create a CGATS object from an existing CGATS file
pub fn write_to_file<P: AsRef<Path>>(&self, file: P) -> Result<()>
[src]
Write a CGATS object to a properly formatted CGATS file
pub fn format(&self) -> String
[src]
Format the entire CGATS object to a string
impl Cgats
[src]
pub fn average(collection: Vec<Cgats>) -> Result<Cgats>
[src]
Average all the values in a collection of CGATS. Returns an Error if the DATA_FORMATS or NUMBER_OF_SAMPLES don't match.
pub fn concatenate(collection: Vec<Cgats>) -> Result<Cgats>
[src]
Concatente multiple CGATS file from a collection. Returns an Error if the DATA_FORMATS don't match.
pub fn deltae(self, other: Cgats, method: DEMethod) -> Result<Cgats>
[src]
Calculate DELTA E of all samples between exactly 2 CGATS objects. Returns an Error if both CGATS do not contain LAB, or if the NUMBER_OF_SAMPLES differ.
pub fn de_method(&self) -> Result<(usize, DEMethod)>
[src]
Returns the index and the first DEMethod found in the DATA_FORMAT Returns an error if no DE is found
pub fn field_index(&self, field: &Field) -> Option<usize>
[src]
Returns the index of a given Field
, returns None
if not present.
pub fn reindex_sample_id(&mut self)
[src]
Replace SAMPLE_ID values with the index of the sample (starting from 0)
pub fn insert_sample_id(&mut self)
[src]
Insert SAMPLE_ID field into CGATS object
Trait Implementations
impl PartialEq<Cgats> for Cgats
[src]
impl Default for Cgats
[src]
impl Clone for Cgats
[src]
fn clone(&self) -> Cgats
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Cgats
[src]
impl Debug for Cgats
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,