Skip to content
Snippets Groups Projects

Resolve "Documentation In-Depth"

Merged aknecht2 requested to merge 28-documentation-in-depth into master
32 files
+ 872
201
Compare changes
  • Side-by-side
  • Inline
Files
32
@@ -2,26 +2,26 @@ from module_generator import ModuleGenerator
@@ -2,26 +2,26 @@ from module_generator import ModuleGenerator
from chipathlon.result import Result
from chipathlon.result import Result
class AlignGenerator(ModuleGenerator):
class AlignGenerator(ModuleGenerator):
 
"""
 
:param dax: The workflow graph object
 
:type dax: Peagasus.DAX3.ADAG
 
:param master_jobs: The dictionary mapping job name -> pegasus job object.
 
:type master_jobs: dict
 
:param master_files: The dictionary mapping file name -> pegasus file object.
 
:type master_files: dict
 
:param mdb: A MongoDB database class for fetching sample meta data.
 
:type mdb: :py:class:`~chipathlon.db.MongoDB`
 
:param workflow_module: The actual module being used.
 
:type workflow_module: :py:class:`~chipathlon.workflow_module.WorkflowModule`
 
:param workflow_jobs: Dictionary mapping workflow_job name -> workflow_job instance
 
:type workflow_jobs: dict
 
:param base_path: Base location of the workflow, used to save metadata files.
 
:type base_path: str
 
:param debug: If true, prints out params for each job & module.
 
:type debug: bool
 
"""
def __init__(self, dax, master_jobs, master_files, mdb, workflow_module, workflow_jobs, base_path, debug=False):
def __init__(self, dax, master_jobs, master_files, mdb, workflow_module, workflow_jobs, base_path, debug=False):
"""
:param dax: The workflow graph object
:type dax: Peagasus.DAX3.ADAG
:param master_jobs: The dictionary mapping job name -> pegasus job object.
:type master_jobs: dict
:param master_files: The dictionary mapping file name -> pegasus file object.
:type master_files: dict
:param mdb: A MongoDB database class for fetching sample meta data.
:type mdb: :py:class:chipathlon.db.MongoDB
:param workflow_module: The actual module being used.
:type workflow_module: chipathlon.workflow_module.WorkflowModule
:param workflow_jobs: Dictionary mapping workflow_job name -> workflow_job instance
:type workflow_jobs: dict
:param base_path: Base location of the workflow, used to save metadata files.
:type base_path: str
:param debug: If true, prints out params for each job & module.
:type debug: bool
"""
super(AlignGenerator, self).__init__(dax, master_jobs, master_files, mdb, workflow_module, workflow_jobs, base_path, debug)
super(AlignGenerator, self).__init__(dax, master_jobs, master_files, mdb, workflow_module, workflow_jobs, base_path, debug)
self.generate_calls = {
self.generate_calls = {
"bwa": {
"bwa": {
@@ -40,7 +40,7 @@ class AlignGenerator(ModuleGenerator):
@@ -40,7 +40,7 @@ class AlignGenerator(ModuleGenerator):
def _bwa_init(self, run):
def _bwa_init(self, run):
"""
"""
:param run: The run to load genome files for
:param run: The run to load genome files for
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
Loads required genome files for bwa in to the dictionary structure
Loads required genome files for bwa in to the dictionary structure
expected by the actual workflow module. Specifically, this maps:
expected by the actual workflow module. Specifically, this maps:
@@ -60,7 +60,7 @@ class AlignGenerator(ModuleGenerator):
@@ -60,7 +60,7 @@ class AlignGenerator(ModuleGenerator):
def _bowtie2_init(self, run):
def _bowtie2_init(self, run):
"""
"""
:param run: The run to load genome files for
:param run: The run to load genome files for
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
Loads required genome files for bowtie2 in to the dictionary structure
Loads required genome files for bowtie2 in to the dictionary structure
expected by the actual workflow module. Specifically, this maps:
expected by the actual workflow module. Specifically, this maps:
@@ -82,9 +82,9 @@ class AlignGenerator(ModuleGenerator):
@@ -82,9 +82,9 @@ class AlignGenerator(ModuleGenerator):
def _bwa_single(self, run, result):
def _bwa_single(self, run, result):
"""
"""
:param run: The run to generate jobs for
:param run: The run to generate jobs for
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
:param result: The result to generate jobs for.
:param result: The result to generate jobs for.
:type result: :py:class:chipathlon.result.Result
:type result: :py:class:`~chipathlon.result.Result`
Creates inputs, additional_inputs, and outputs for bwa alignment
Creates inputs, additional_inputs, and outputs for bwa alignment
jobs with single end reads. Only the first file in prev_results will
jobs with single end reads. Only the first file in prev_results will
@@ -99,9 +99,9 @@ class AlignGenerator(ModuleGenerator):
@@ -99,9 +99,9 @@ class AlignGenerator(ModuleGenerator):
def _bwa_paired(self, run, result):
def _bwa_paired(self, run, result):
"""
"""
:param run: The run to generate jobs for
:param run: The run to generate jobs for
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
:param result: The result to generate jobs for.
:param result: The result to generate jobs for.
:type result: :py:class:chipathlon.result.Result
:type result: :py:class:`~chipathlon.result.Result`
Creates inputs, additional_inputs, and outputs for bwa alignment
Creates inputs, additional_inputs, and outputs for bwa alignment
jobs with paired end reads.
jobs with paired end reads.
@@ -116,9 +116,9 @@ class AlignGenerator(ModuleGenerator):
@@ -116,9 +116,9 @@ class AlignGenerator(ModuleGenerator):
def _bowtie2_single(self, run, result):
def _bowtie2_single(self, run, result):
"""
"""
:param run: The run to generate jobs for
:param run: The run to generate jobs for
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
:param result: The result to generate jobs for.
:param result: The result to generate jobs for.
:type result: :py:class:chipathlon.result.Result
:type result: :py:class:`~chipathlon.result.Result`
Creates inputs, additional_inputs, and outputs for bowtie2 alignment
Creates inputs, additional_inputs, and outputs for bowtie2 alignment
jobs with single end reads. Only the first file in prev_results will
jobs with single end reads. Only the first file in prev_results will
@@ -134,9 +134,9 @@ class AlignGenerator(ModuleGenerator):
@@ -134,9 +134,9 @@ class AlignGenerator(ModuleGenerator):
def _bowtie2_paired(self, run, result):
def _bowtie2_paired(self, run, result):
"""
"""
:param run: The run to generate jobs for
:param run: The run to generate jobs for
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
:param result: The result to generate jobs for.
:param result: The result to generate jobs for.
:type result: :py:class:chipathlon.result.Result
:type result: :py:class:`~chipathlon.result.Result`
Creates inputs, additional_inputs, and outputs for bowtie2 alignment
Creates inputs, additional_inputs, and outputs for bowtie2 alignment
jobs with paired end reads.
jobs with paired end reads.
@@ -178,7 +178,7 @@ class AlignGenerator(ModuleGenerator):
@@ -178,7 +178,7 @@ class AlignGenerator(ModuleGenerator):
def create_final_results(self, run):
def create_final_results(self, run):
"""
"""
:param run: The target run to generate jobs for.
:param run: The target run to generate jobs for.
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
"""
"""
control_samples = run.get_samples("control")
control_samples = run.get_samples("control")
signal_samples = run.get_samples("signal")
signal_samples = run.get_samples("signal")
@@ -214,9 +214,9 @@ class AlignGenerator(ModuleGenerator):
@@ -214,9 +214,9 @@ class AlignGenerator(ModuleGenerator):
def find_prev_results(self, run, result):
def find_prev_results(self, run, result):
"""
"""
:param run: The target run to generate jobs for.
:param run: The target run to generate jobs for.
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
:param result: The target result to create jobs for.
:param result: The target result to create jobs for.
:type result: :py:class:chipathlon.result.Result
:type result: :py:class:`~chipathlon.result.Result`
"""
"""
download_samples = run.get_results("download", "encode.fastq.gz")
download_samples = run.get_results("download", "encode.fastq.gz")
prev_results = []
prev_results = []
@@ -231,9 +231,9 @@ class AlignGenerator(ModuleGenerator):
@@ -231,9 +231,9 @@ class AlignGenerator(ModuleGenerator):
def parse_result(self, run, result):
def parse_result(self, run, result):
"""
"""
:param run: The target run to generate jobs for.
:param run: The target run to generate jobs for.
:type run: :py:class:chipathlon.run.Run
:type run: :py:class:`~chipathlon.run.Run`
:param result: The target result to create jobs for.
:param result: The target result to create jobs for.
:type result: :py:class:chipathlon.result.Result
:type result: :py:class:`~chipathlon.result.Result`
"""
"""
prev_results = self.get_prev_results(run, result)
prev_results = self.get_prev_results(run, result)
markers, inputs, additional_inputs = self.generate_calls[run.genome.tool][len(prev_results)](run, result)
markers, inputs, additional_inputs = self.generate_calls[run.genome.tool][len(prev_results)](run, result)
Loading