swamp.mr.mrjob module

class MrJob(id, workdir, python_interpreter=None, extend_solution=False)[source]

Bases: object

Class to manage the creation and execution of a MrRun in the context of a parent container MrArray instance.

This class implements methods to create a python script that can be executed as single independent job. It also implements utilities and data structures to retrieve and store the results obtained with the resulting instance of MrRun.

Parameters:
  • id (str) – unique identifier of this MrJob isntance
  • workdir (str) – working directory for MrJob instance
  • python_interpreter (str) – python interpreter for the pyjob.Script
Variables:
  • id (str) – Unique identifier of this MrJob isntance
  • phased_mtz (str) – target’s mtz filename containing phases (default None)
  • target_mtz (str) – target’s mtz filename (default None)
  • target_fa (str) – target’s fasta filename (default None)
  • searchmodel_list (list) – A list with the search models to be used in the MrRun instance
add_searchmodel(**kwargs)[source]

Provide necessary information to add a given search model to the MrRun instance.

Parameters:kwargs – directly used into add_searchmodel()
make_workdir()[source]

Create the workdir

parent_array

The parent MrArray instance

python_script

String with the python script to create and execute the MrRun instance associated with this MrJob

results

A nested list with the results of the MrRun instance created with the execution of python_script

script

A pyjob.Script instance that will be executed on this MrJob