swamp.mr.mrresults module

class MrResults(swamp_workdir, logger=None)[source]

Bases: object

Class to handle the results py:obj:~swamp.mr.mrarray.MrArray instance

Parameters:
  • swamp_workdir (str) – the MrArray working directory
  • logger (SwampLogger) – logging interface for the MR pipeline (default None)
Variables:
  • results (list) – nested list with the figures of merit obtained after the completion of MrArray isntance
  • pickle_list (list) – a list of pickle file names for all the MrRun instances contained in the MrArray instance
  • mr_dir (str) – the directory with the MR results obtained with MrArray instance
static is_rundir(dir)[source]

Check if a given directory is a valid swamp-mr run directory

Parameters:dir (str) – directory of interest
Returns:True if the input directory is an existing swamp run directory otherwise False
static is_searchdir(dir)[source]

Check if a given directory is a swamp-mr search directory

Parameters:dir (str) – directory of interest
Returns:True if the input directory is a swamp search directory otherwise False
logger_header

Header used whe initialising the SwampLogger

static lookup_pickles(mr_dir)[source]

Search a given directory for result pickle files

Parameters:mr_dir (str) – the directory of interest to be searched
Returns:a tuple with the pickle files that were found
report_results(top=50, sort_by='SHXE_CC')[source]

Print in the stdout a table with the indicated top results

Parameters:
  • top (int) – top number of results to display
  • sort_by (str) – the column name to use for sorting the table
create_argument_parser()[source]

Create a parser for the command line arguments used in swamp-results