Struct ReadfishSummary

Source
pub struct ReadfishSummary { /* private fields */ }
Expand description

Organise the data and methods for analysing a readfish PAF file.

Implementations§

Source§

impl ReadfishSummary

Source

pub fn new() -> Self

Creates a new instance of ReadfishSummary with default values.

This function initializes a new ReadfishSummary struct with default values for all fields. The summary field will be initialized with an empty Summary instance. The _conf, _sequencing_summary, and _paf_file fields will be set to None, indicating that they have not been initialized with specific values yet.

§Returns

A new ReadfishSummary instance with default values.

§Examples
use readfish_tools::ReadfishSummary;

let summary = ReadfishSummary::new();
assert_eq!(summary.has_conf(), false); // _conf field is not set yet
assert_eq!(summary.has_sequencing_summary(), false); // _sequencing_summary field is not set yet
assert_eq!(summary.has_paf_file(), false); // _paf_file field is not set yet
Source

pub fn conf(&self) -> Option<&Conf>

Update a condition on the summary Get the config TOML file for the readfish run.

Source

pub fn set_conf(&mut self, conf: Conf)

Set the config TOML file for the readfish run.

Source

pub fn parse_conf_file(&mut self, conf_path: PathBuf)

Parse a path to a config file and add it to the ReadfishSummary

Source

pub fn sequencing_summary(&self) -> Option<&SeqSum>

Get the sequencing summary file.

Source

pub fn set_sequencing_summary(&mut self, sequencing_summary: SeqSum)

Set the sequencing summary file.

Source

pub fn parse_sequencing_summary(&mut self, seq_sum_path: PathBuf)

Parse a provided sequencing summary file path and set it on the summary

Source

pub fn paf_file(&self) -> Option<&Paf>

Get the PAF file.

Source

pub fn set_paf_file(&mut self, paf_file: Paf)

Set the PAF file.

Source

pub fn has_conf(&self) -> bool

Check if the config TOML file is set.

Source

pub fn has_sequencing_summary(&self) -> bool

Check if the sequencing summary file is set.

Source

pub fn has_paf_file(&self) -> bool

Check if the PAF file is set.

Source§

impl ReadfishSummary

Implements methods for interacting with a ReadfishSummary instance from Python.

Source

pub fn print_summary(&self) -> PyResult<()>

Prints the summary of the ReadfishSummary to the standard output.

This method borrows the ReadfishSummary immutably and prints its summary to the standard output. The summary is obtained by calling the borrow method on the RefCell<Summary> field of the ReadfishSummary.

§Returns

This function returns a PyResult<()> to indicate success or failure. If the summary is successfully printed, Ok(()) is returned. If an error occurs during printing, an appropriate PyErr will be set, and Err will be returned.

§Examples

/// Method to print the summary of ReadfishSummary.
pub fn print_summary(&self) -> PyResult<()> {
    println!("{}", self.summary.borrow());
    Ok(())
}

The method can be called on an instance of ReadfishSummary to print its summary.

Trait Implementations§

Source§

impl Default for ReadfishSummary

Source§

fn default() -> Self

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

impl IntoPy<Py<PyAny>> for ReadfishSummary

Source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
Source§

impl PyClass for ReadfishSummary

Source§

type Frozen = False

Whether the pyclass is frozen. Read more
Source§

impl PyClassImpl for ReadfishSummary

Source§

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

type Layout = PyCell<ReadfishSummary>

Layout
Source§

type BaseType = PyAny

Base class
Source§

type ThreadChecker = ThreadCheckerStub<ReadfishSummary>

This handles following two situations: Read more
Source§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn doc(py: Python<'_>) -> PyResult<&'static CStr>

Rendered class doc
Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

Source§

fn dict_offset() -> Option<isize>

Source§

fn weaklist_offset() -> Option<isize>

Source§

impl PyClassNewTextSignature<ReadfishSummary> for PyClassImplCollector<ReadfishSummary>

Source§

fn new_text_signature(self) -> Option<&'static str>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a ReadfishSummary

Source§

type Holder = Option<PyRef<'py, ReadfishSummary>>

Source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut ReadfishSummary

Source§

type Holder = Option<PyRefMut<'py, ReadfishSummary>>

Source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

Source§

impl PyMethods<ReadfishSummary> for PyClassImplCollector<ReadfishSummary>

Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl PyTypeInfo for ReadfishSummary

Source§

const NAME: &'static str = "ReadfishSummary"

Class name.
Source§

const MODULE: Option<&'static str> = ::core::option::Option::None

Module name, if any.
Source§

type AsRefTarget = PyCell<ReadfishSummary>

Utility type to make Py::as_ref work.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
Source§

fn type_object(py: Python<'_>) -> &PyType

Returns the safe abstraction over the type object.
Source§

fn is_type_of(object: &PyAny) -> bool

Checks if object is an instance of this type or a subclass of this type.
Source§

fn is_exact_type_of(object: &PyAny) -> bool

Checks if object is an instance of this type.

Auto Trait Implementations§

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, 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> OkWrap<T> for T
where T: IntoPy<Py<PyAny>>,

Source§

type Error = PyErr

Source§

fn wrap(self, py: Python<'_>) -> Result<Py<PyAny>, PyErr>

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> Ungil for T
where T: Send,