seqgra.misc module¶
Miscellaneous helper functions
- Classes:
MiscHelper
: contains static helper functions
- class MiscHelper[source]¶
Bases:
object
Class with miscellaneous helper functions as static methods
- static prepare_path(path: str, allow_exists: bool = True, allow_non_empty: bool = False) → str[source]¶
- static print_progress_bar(iteration: int, total: int, prefix: str = '', suffix: str = '', decimals: int = 1, length: int = 100, fill: str = '█', print_end: str = '\r')[source]¶
Call in a loop to create terminal progress bar
- Parameters
iteration (int) – current iteration
total (
list
ofstr
, optional) – total iterationsprefix (
str
, optional) – prefix string, defaults to empty stringsuffix (str, optional) – suffix string, defaults to empty string
decimals (int, optional) – positive number of decimals in percent complete, defaults to 1
length (dict [str, str], optional) – character length of bar, defaults to 100
fill (
dict
[str
,str
], optional) – bar fill character, defaults to “█”print_end (str, optional) – end character (e.g. “\r”, “\r\n”), defaults to “\r”