riverine.printing#
Attributes#
Pass this as the parameter tablefmt in any method that accepts that parameter to have the table |
|
Classes#
Class for handling a line of a (processed) mix recipe. |
Functions#
|
Emphasizes text according to tablefmt, e.g., for Markdown (e.g., tablefmt = 'pipe'), |
|
|
|
|
|
|
|
|
|
|
|
|
|
Return Markdown table representing which lanes to put samples into for a gel. |
Module Contents#
- riverine.printing.emphasize(text: str, tablefmt: str | tabulate.TableFormat, strong: bool = False) str[source]#
Emphasizes text according to tablefmt, e.g., for Markdown (e.g., tablefmt = ‘pipe’), surrounds with pair of *’s; if strong is True, with double *’s. For tablefmt = ‘html’, uses
<emph>or<strong>.- Parameters:
text – text to emphasize
tablefmt – format in which to add emphasis markup
- Return type:
emphasized version of text
- riverine.printing._html_row_with_attrs(celltag: str, cell_values: riverine.units.Sequence[str], colwidths: riverine.units.Sequence[int], colaligns: riverine.units.Sequence[str]) str[source]#
- riverine.printing.html_with_borders_tablefmt[source]#
Pass this as the parameter tablefmt in any method that accepts that parameter to have the table be an HTML table with borders around each cell.
- riverine.printing._formatter(x: float | str | list[str] | riverine.units.DecimalQuantity | None, italic: bool = False, tablefmt: str | tabulate.TableFormat = 'pipe', splits: list = []) str[source]#
- class riverine.printing.MixLine[source]#
Class for handling a line of a (processed) mix recipe.
Each line should represent a single step, or series of similar steps (same volume per substep) in the mixing process.
- Parameters:
names – A list of component names. For a single step, use [name].
source_conc – The source concentration; may not be provided (will be left blank), or be a descriptive string.
dest_conc – The destination/target concentration; may not be provided (will be left blank), or be a descriptive string.
total_tx_vol – The total volume added to the mix by the step. If zero, the amount will still be included in tables. If None, the amount will be blank. If provided, and the line is not fake, the value must be correct and interpretable for calculations involving the mix.
number – The number of components added / subste
each_tx_vol – The volume per component / substep. May be omitted, or a descriptive string.
plate – The plate name for the mix, a descriptive string for location / source type (eg, “tube”) or None (omitted). A single MixLine, at present, should not involve multiple plates.
wells – A list of wells for the components in a plate. If the components are not in a plate, this must be an empty list. This does not parse strings; wells must be provided as WellPos instances.
note – A note to add for the line
fake – Denotes that the line is not a real step, eg, for a summary/total information line. The line will be distinguished in some way in tables (eg, italics) and will not be included in calculations.
- source_conc: riverine.units.DecimalQuantity | str | None = None[source]#
- dest_conc: riverine.units.DecimalQuantity | str | None = None[source]#
- total_tx_vol: riverine.units.DecimalQuantity[source]#
- each_tx_vol: riverine.units.DecimalQuantity[source]#
- wells: list[riverine.locations.WellPos][source]#
- riverine.printing._format_title(raw_title: str, level: int, tablefmt: str | tabulate.TableFormat) str[source]#
- riverine.printing._format_errors(errors: list[riverine.units.VolumeError], tablefmt: tabulate.TableFormat | str) str[source]#
- riverine.printing._format_location(loc: tuple[str | None, riverine.locations.WellPos | None]) str[source]#
- riverine.printing.gel_table(sample_names: Iterable[str], num_lanes: int | None = None, tablefmt: tabulate.TableFormat | str = 'pipe') str[source]#
Return Markdown table representing which lanes to put samples into for a gel.
- Parameters:
sample_names – names of samples to go into lanes of the gel
num_lanes – total number of lanes in the gel; if not specified, assumed to be number of elements in sample_names
tablefmt – The output format for the table. (See documentation for table formats in tabulate package.)
- Return type:
Markdown table representing which lanes to put samples into for a gel