auto_process_ngs.qc.modules.qualimap_rnaseq

Implements the ‘qualimap_rnaseq’ QC module:

  • QualimapRnaseq: core QCModule class

  • RunQualimapRnaseq: pipeline task to run Qualimap ‘rnaseq’

class auto_process_ngs.qc.modules.qualimap_rnaseq.QualimapRnaseq

Class for handling the ‘qualimap_rnaseq’ QC module

classmethod add_to_pipeline(p, project_name, qc_dir, bam_files, gtf_annotation, organism_name, rseqc_infer_experiment_outputs, required_tasks=[], qualimap_runner=None)

Adds tasks for ‘qualimap_rnaseq’ module to pipeline

Parameters:
  • p (Pipeline) – pipeline to extend

  • project_name (str) – name of project

  • qc_dir (str) – path to QC directory

  • bam_files (list) – BAM files to run the module on

  • gtf_annotation (str) – path to reference gene model GTF file

  • organism_name (str) – normalised name for organism that BAMs are aligned to

  • rseqc_infer_experiment_outputs (dict) – mapping of BAM names to dictionaries of associated RSeCQ ‘infer_experiment.py’ outputs

  • required_tasks (list) – list of tasks that the module needs to wait for

  • qualimap_runner (JobRunner) – runner to use for Qualimap

classmethod collect_qc_outputs(qc_dir)

Collect information on Qualimap ‘rnaseq’ outputs

Returns an AttributeDictionary with the following attributes:

  • name: set to ‘qualimap_rnaseq’

  • software: dictionary of software and versions

  • organisms: list of organisms with associated outputs

  • bam_files: list of associated BAM file names

  • output_files: list of associated output files

  • tags: list of associated output classes

Parameters:

qc_dir (QCDir) – QC directory to examine

classmethod verify(params, qc_outputs)

Verify ‘qualimap_rnaseq’ QC module against outputs

Returns one of 3 values:

  • True: outputs verified ok

  • False: outputs failed to verify

  • None: verification not possible

Parameters:
  • params (AttributeDictionary) – values of parameters used as inputs

  • qc_outputs (AttributeDictionary) – QC outputs returned from the ‘collect_qc_outputs’ method

class auto_process_ngs.qc.modules.qualimap_rnaseq.RunQualimapRnaseq(_name, *args, **kws)

Run Qualimap’s ‘rnaseq’ module on BAM files

Given a list of BAM files, for each file runs the Qualimap ‘rnaseq’ module (http://qualimap.conesalab.org/doc_html/command_line.html#rna-seq-qc)

finish()

Perform actions on task completion

Performs any actions that are required on completion of the task, such as moving or copying data, and setting the values of any output parameters.

Must be implemented by the subclass

init(bam_files, feature_file, out_dir, bam_properties)

Initialise the RunQualimapRnaseq task

Parameters:
  • bam_files (list) – list of paths to BAM files to run Qualimap rnaseq on

  • feature_file (str) – path to GTF file with the reference annotation data

  • out_dir (str) – path to a directory where the output files will be written

  • bam_properties (mapping) – properties for each BAM file from RSeQC ‘infer_experiment.py’ (used to determine if BAM is paired and what the strand-specificity is)

setup()

Set up commands to be performed by the task

Must be implemented by the subclass