pub struct BasicStats { /* private fields */ }Implementations§
Source§impl BasicStats
impl BasicStats
pub fn new(_limits: &Limits) -> Self
Sourcepub fn set_file_name(&mut self, name: &str)
pub fn set_file_name(&mut self, name: &str)
Set the filename, stripping any “stdin:” prefix.
Matches setFileName() which strips “stdin:” prefix.
Sourcepub fn format_length(original_length: u64) -> String
pub fn format_length(original_length: u64) -> String
Format a base count into a human-readable string.
Replicates BasicStats.formatLength(long) exactly, including
its custom decimal truncation logic (keeps at most 1 non-zero decimal digit).
Trait Implementations§
Source§impl QCModule for BasicStats
impl QCModule for BasicStats
Source§fn process_sequence(&mut self, sequence: &Sequence)
fn process_sequence(&mut self, sequence: &Sequence)
Process a single sequence record, accumulating statistics.
Source§fn set_filename(&mut self, name: &str)
fn set_filename(&mut self, name: &str)
Set the source filename for this module.
BasicStats uses this to display the filename in the report.
Other modules ignore it.
Source§fn description(&self) -> &str
fn description(&self) -> &str
A longer description of what this module checks.
Source§fn raises_error(&self) -> bool
fn raises_error(&self) -> bool
Whether the module results should trigger a failure status.
Source§fn raises_warning(&self) -> bool
fn raises_warning(&self) -> bool
Whether the module results should trigger a warning status.
Source§fn ignore_filtered_sequences(&self) -> bool
fn ignore_filtered_sequences(&self) -> bool
Whether this module should skip sequences flagged as filtered.
Source§fn ignore_in_report(&self) -> bool
fn ignore_in_report(&self) -> bool
Whether this module should be excluded from the report.
Matches
ignoreInReport() - used e.g. by PerTileQuality when
there are no tile IDs in the data.Source§fn write_text_report(&self, writer: &mut dyn Write) -> Result<()>
fn write_text_report(&self, writer: &mut dyn Write) -> Result<()>
Write this module’s section to the text report.
Source§fn finalize(&mut self)
fn finalize(&mut self)
Finalize calculations after all sequences have been processed. Read more
Source§fn status(&self) -> ModuleStatus
fn status(&self) -> ModuleStatus
The current status of this module.
Source§fn chart_image_name(&self) -> Option<&str>
fn chart_image_name(&self) -> Option<&str>
Return the base filename for this module’s chart image (without extension).
Matches the filenames used in Images/ directory of the zip archive,
e.g. “per_base_quality” for per_base_quality.png and per_base_quality.svg.
Source§fn chart_alt_text(&self) -> Option<&str>
fn chart_alt_text(&self) -> Option<&str>
Return the alt text for this module’s chart image, if it has one.
Modules that produce charts should override this to return Some(“…”).
The default
write_html_report uses this to call write_chart_and_table
automatically, so modules with charts only need to implement this method
instead of overriding write_html_report.Source§fn generate_chart_svg(&self) -> Option<String>
fn generate_chart_svg(&self) -> Option<String>
Generate the SVG chart content for this module, if applicable.
In Java, writeDefaultImage() renders the Swing JPanel to both SVG
and PNG. Here we generate SVG first, then convert to PNG via resvg.
Auto Trait Implementations§
impl Freeze for BasicStats
impl RefUnwindSafe for BasicStats
impl Send for BasicStats
impl Sync for BasicStats
impl Unpin for BasicStats
impl UnsafeUnpin for BasicStats
impl UnwindSafe for BasicStats
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
Mutably borrows from an owned value. Read more
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.