swamp.mr.mr module¶
-
class
Mr
(id, target_fa, target_mtz, workdir, phased_mtz=None, logger=None, silent=False)[source]¶ Bases:
abc.ABC
This is an abstract class for MR pipelines. It implements data structures and methods commonly used in MR tasks.
Parameters: - id (str) – unique identifier for the
Mr
instance - target_fa (str) – target’s fasta filename
- target_mtz (str) – target’s mtz filename
- workdir (str) – working directory where the MR pipeline will be executed
- phased_mtz (str) – filename of the target’s mtz containing phase information (default None)
- logger (SwampLogger) – logging interface for the MR pipeline (default None)
- silent (bool) – if set to True the logger will not print messages (default False)
Variables: -
cleanup_dir_list
¶ Abstract property to hold the location of the directories to cleanup after completion of the pipeline
-
create_result_table_outfile
(fname=None)[source]¶ Method to write string representation of
table_contents
intoresult_table_fname
or into a specific file if fname is set.Parameters: fname (str) – filename where the result table will be created (default None)
-
pipeline_header
¶ Header displayed when initiating
SwampLogger
-
result_table_fname
¶ Filename where the string representation of
table_contents
will be written
-
store_pickle
(fname=None, mode='ab')[source]¶ Method to pickle the
Mr
instance into a fileParameters:
-
table_contents
¶ String representation of
results
displayed as a table
- id (str) – unique identifier for the