Class: CagnutPipelineDraw::Pipeline::Recalibration

Inherits:
Object
  • Object
show all
Defined in:
lib/cagnut_pipeline_draw/pipeline/recalibration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_name) ⇒ Recalibration

Returns a new instance of Recalibration.



6
7
8
9
10
11
12
# File 'lib/cagnut_pipeline_draw/pipeline/recalibration.rb', line 6

def initialize job_name
  @job_name = job_name
  @config = Cagnut::Configuration.config
  @gatk = ::CagnutGatk::Util.new @config
  @picard = ::CagnutPicard::Util.new @config
  @samtools = ::CagnutSamtools::Util.new
end

Instance Attribute Details

#gatkObject

Returns the value of attribute gatk.



4
5
6
# File 'lib/cagnut_pipeline_draw/pipeline/recalibration.rb', line 4

def gatk
  @gatk
end

#picardObject

Returns the value of attribute picard.



4
5
6
# File 'lib/cagnut_pipeline_draw/pipeline/recalibration.rb', line 4

def picard
  @picard
end

#samtoolsObject

Returns the value of attribute samtools.



4
5
6
# File 'lib/cagnut_pipeline_draw/pipeline/recalibration.rb', line 4

def samtools
  @samtools
end

Instance Method Details

#run(filename = nil, order = 1) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/cagnut_pipeline_draw/pipeline/recalibration.rb', line 14

def run filename = nil, order=1
  job_name, filename, order = picard.markdup picard_markup_dirs, order, @job_name, filename
  order = samtools.do_flag_stat samtools_do_flag_stat_dirs, order, job_name, filename
  order = gatk.count_read gatk_count_read_dirs, order, job_name, filename
  job_name, filename, order = gatk.recal gatk_recal_dirs, order, job_name, filename
  order = picard.picard_qc_metrics picard_picard_qc_metrics_dirs, order, job_name, filename
  [job_name, filename, order]
end