pub struct ReadfishSummary { /* private fields */ }
Expand description
Organise the data and methods for analysing a readfish PAF file.
Implementations§
Source§impl ReadfishSummary
impl ReadfishSummary
Sourcepub fn new() -> Self
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
Sourcepub fn conf(&self) -> Option<&Conf>
pub fn conf(&self) -> Option<&Conf>
Update a condition on the summary Get the config TOML file for the readfish run.
Sourcepub fn parse_conf_file(&mut self, conf_path: PathBuf)
pub fn parse_conf_file(&mut self, conf_path: PathBuf)
Parse a path to a config file and add it to the ReadfishSummary
Sourcepub fn sequencing_summary(&self) -> Option<&SeqSum>
pub fn sequencing_summary(&self) -> Option<&SeqSum>
Get the sequencing summary file.
Sourcepub fn set_sequencing_summary(&mut self, sequencing_summary: SeqSum)
pub fn set_sequencing_summary(&mut self, sequencing_summary: SeqSum)
Set the sequencing summary file.
Sourcepub fn parse_sequencing_summary(&mut self, seq_sum_path: PathBuf)
pub fn parse_sequencing_summary(&mut self, seq_sum_path: PathBuf)
Parse a provided sequencing summary file path and set it on the summary
Sourcepub fn set_paf_file(&mut self, paf_file: Paf)
pub fn set_paf_file(&mut self, paf_file: Paf)
Set the PAF file.
Sourcepub fn has_sequencing_summary(&self) -> bool
pub fn has_sequencing_summary(&self) -> bool
Check if the sequencing summary file is set.
Sourcepub fn has_paf_file(&self) -> bool
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.
impl ReadfishSummary
Implements methods for interacting with a ReadfishSummary instance from Python.
Sourcepub fn print_summary(&self) -> PyResult<()>
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
impl Default for ReadfishSummary
Source§impl PyClass for ReadfishSummary
impl PyClass for ReadfishSummary
Source§impl PyClassImpl for ReadfishSummary
impl PyClassImpl for ReadfishSummary
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§type Layout = PyCell<ReadfishSummary>
type Layout = PyCell<ReadfishSummary>
Source§type ThreadChecker = ThreadCheckerStub<ReadfishSummary>
type ThreadChecker = ThreadCheckerStub<ReadfishSummary>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<ReadfishSummary> for PyClassImplCollector<ReadfishSummary>
impl PyClassNewTextSignature<ReadfishSummary> for PyClassImplCollector<ReadfishSummary>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a ReadfishSummary
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a ReadfishSummary
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut ReadfishSummary
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut ReadfishSummary
Source§impl PyMethods<ReadfishSummary> for PyClassImplCollector<ReadfishSummary>
impl PyMethods<ReadfishSummary> for PyClassImplCollector<ReadfishSummary>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for ReadfishSummary
impl PyTypeInfo for ReadfishSummary
Source§type AsRefTarget = PyCell<ReadfishSummary>
type AsRefTarget = PyCell<ReadfishSummary>
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
object
is an instance of this type or a subclass of this type.Source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
object
is an instance of this type.Auto Trait Implementations§
impl !Freeze for ReadfishSummary
impl !RefUnwindSafe for ReadfishSummary
impl Send for ReadfishSummary
impl !Sync for ReadfishSummary
impl Unpin for ReadfishSummary
impl !UnwindSafe for ReadfishSummary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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