sample_id.util module

sample_id.util.basic_attribute_repr(cls)[source]
sample_id.util.class_attributes(cls, filter_types=(<class 'int'>, <class 'float'>, <class 'bool'>, <class 'str'>))[source]
Return type

Dict[str, Any]

sample_id.util.class_repr(cls, filter_types=[], **kwargs)[source]
Return type

str

sample_id.util.filesize(filename)[source]

Human readable string representation of filesize

Return type

str

sample_id.util.gunzip_file(input_filename, output_filename, blocksize=5242880, threads=None)[source]

Gzip a file using mgzip for multithreading.

Return type

str

sample_id.util.gzip_file(output_filename, input_filename, compress_level=9, blocksize=5242880, threads=None)[source]

Gzip a file using mgzip for multithreading.

Return type

str

sample_id.util.human_bytes(bytes)[source]

Human readable string representation of bytes

Return type

str

sample_id.util.kv_string(dicts)[source]
Return type

str

sample_id.util.tar_files(output_filename, files, file_arcnames, delete_added=True)[source]

Tar files.

Return type

str

sample_id.util.untar(input_tarfile, members, output_dir)[source]

Untar an tarball.

Return type

Iterable[str]