mutations_caller_pipeline_aws 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,7 @@ options = { :bam_file_sorted => nil,
44
44
  :vcf => nil,
45
45
  :account => "",
46
46
  :project => "",
47
- :debug => 1,
47
+ :debug => 1
48
48
  }
49
49
 
50
50
  optparse = OptionParser.new do |opts|
@@ -111,6 +111,7 @@ recal_bam = "#{random}_recal.bam"
111
111
  options[:account] = options[:project] if options[:account].empty?
112
112
 
113
113
 
114
+
114
115
  # Indexing
115
116
  SamtoolsIndexing.call(bam_file,
116
117
  job_prefix,
@@ -48,6 +48,8 @@ options = { :mutant_r1 => nil,
48
48
  :account => "",
49
49
  :project => "",
50
50
  :debug => 1,
51
+ :cluster => false,
52
+ :coverage => false
51
53
  }
52
54
 
53
55
  optparse = OptionParser.new do |opts|
@@ -89,6 +91,14 @@ optparse = OptionParser.new do |opts|
89
91
  options[:debug] = 5 if i
90
92
  end
91
93
 
94
+ opts.on("-p","--cluster ", "On compute cluster (none AWS)" ) do |i|
95
+ options[:cluster] = true
96
+ end
97
+
98
+ opts.on("-o","--coverage ", "GATK Coverage summary" ) do |i|
99
+ options[:coverage] = true
100
+ end
101
+
92
102
  opts.on_tail("-h", "--help", "Show this message") do
93
103
  puts opts
94
104
  exit
@@ -125,6 +135,7 @@ sai_file_fwd = "#{random}_fwd.sai"
125
135
  sai_file_rev = "#{random}_rev.sai"
126
136
 
127
137
  options[:account] = options[:project] if options[:account].empty?
138
+ options[:gatk] = "java -Xmx4g -jar #{options[:gatk]}" if options[:cluster]
128
139
 
129
140
  # BWA : ALN
130
141
  BwaCaller.call_aln(options[:mutant_r1],
@@ -219,3 +230,17 @@ GatkCaller.call(log_file,
219
230
  job_prefix,
220
231
  options[:account],
221
232
  options[:debug])
233
+
234
+
235
+ # GATK : coverage
236
+ if options[:coverage]
237
+ outfile_prefix = options[:vcf].gsub(/.vcf/,"_coverage")
238
+ GatkCaller.coverage(
239
+ log_file,
240
+ options[:gatk],
241
+ options[:index_fa],
242
+ recal_bam,
243
+ job_prefix,
244
+ options[:account],
245
+ options[:debug])
246
+ end
@@ -3,7 +3,7 @@ class GatkCaller
3
3
  # Genotyper
4
4
  def self.call(log_dir, gatk, index_fa, read_bam, read_vcf, job_prefix, account, debug)
5
5
  cmd = "echo 'starting GATK for mutant at ' `date` >> #{log_dir}
6
- qsub -o #{log_dir} -V -cwd -b y -N genotyper_#{job_prefix} -l h_vmem=4G -hold_jid recalibration_#{job_prefix} #{account}\
6
+ qsub -o #{log_dir} -V -cwd -b y -N genotyper_#{job_prefix} -l h_vmem=4.5G -hold_jid recalibration_#{job_prefix} #{account}\
7
7
  #{gatk} -l INFO -R #{index_fa} -T UnifiedGenotyper \
8
8
  -I #{read_bam} \
9
9
  -o #{read_vcf} \
@@ -12,10 +12,22 @@ class GatkCaller
12
12
  system(cmd) if debug == 1
13
13
  end
14
14
 
15
+ # INDEX is normal genom.fa
16
+ # Coverage Summary
17
+ def self.coverage(log_dir, gatk, index_fa, read_bam, outfile_prefix, job_prefix, account, debug)
18
+ cmd = "echo 'starting coverage GATK for mutant at ' `date` >> #{log_dir}
19
+ qsub -o #{log_dir} -V -cwd -b y -N genotyper_#{job_prefix} -l h_vmem=4.5G -hold_jid recalibration_#{job_prefix} #{account}\
20
+ #{gatk} -R #{index_fa} -T DepthOfCoverage \
21
+ -I #{read_bam} \
22
+ -o #{outfile_prefix} "
23
+ puts cmd
24
+ system(cmd) if debug == 1
25
+ end
26
+
15
27
  # Making recalibration table
16
28
  def self.recalibrate_bam(log_dir ,gatk, index_fa, index_vcf, read_bam, recal_file, job_prefix, account, debug )
17
29
  cmd = "echo 'starting recalibration table ' `date` >> #{log_dir}
18
- qsub -o #{log_dir} -V -cwd -b y -N recalibration_table_#{job_prefix} -l h_vmem=4G -hold_jid realignment_#{job_prefix} #{account} \
30
+ qsub -o #{log_dir} -V -cwd -b y -N recalibration_table_#{job_prefix} -l h_vmem=4.5G -hold_jid realignment_#{job_prefix} #{account} \
19
31
  #{gatk} -knownSites #{index_vcf} -I #{read_bam} \
20
32
  -R #{index_fa} -T CountCovariates \
21
33
  -cov ReadGroupCovariate -cov QualityScoreCovariate -cov DinucCovariate \
@@ -28,7 +40,7 @@ class GatkCaller
28
40
  # Using recalibration table
29
41
  def self.table_calibration(log_dir, gatk, index_fa, read_bam, recal_bam, recal_file, job_prefix, account, debug)
30
42
  cmd = "echo 'recalibrating bam_file at ' `date` >> #{log_dir}
31
- qsub -V -o #{log_dir} -cwd -b y -N recalibration_#{job_prefix} -l h_vmem=4G -hold_jid recalibration_table_#{job_prefix} #{account} \
43
+ qsub -V -o #{log_dir} -cwd -b y -N recalibration_#{job_prefix} -l h_vmem=4.5G -hold_jid recalibration_table_#{job_prefix} #{account} \
32
44
  #{gatk} \
33
45
  -R #{index_fa} \
34
46
  -I #{read_bam} \
@@ -42,7 +54,7 @@ class GatkCaller
42
54
  # Preparation realignement
43
55
  def self.prepare_realigne(log_dir, gatk, read_bam, index_fa, target_intervals, job_prefix, account, debug)
44
56
  cmd = "echo 'preparing realignement at ' `date` >> #{log_dir}
45
- qsub -o #{log_dir} -V -cwd -b y -N prep_realignment_#{job_prefix} -l h_vmem=4G -hold_jid indexing_#{job_prefix} #{account}\
57
+ qsub -o #{log_dir} -V -cwd -b y -N prep_realignment_#{job_prefix} -l h_vmem=4.5G -hold_jid indexing_#{job_prefix} #{account}\
46
58
  #{gatk} \
47
59
  -I #{read_bam} \
48
60
  -R #{index_fa} \
@@ -55,7 +67,7 @@ class GatkCaller
55
67
  # Realignment
56
68
  def self.realigne(log_dir, gatk, read_bam, index_fa, target_intervals, realigned_bam, job_prefix, account, debug)
57
69
  cmd = "echo 'preparing realignement at ' `date` >> #{log_dir}
58
- qsub -o #{log_dir} -V -cwd -b y -N realignment_#{job_prefix} -l h_vmem=4G -hold_jid prep_realignment_#{job_prefix} #{account} \
70
+ qsub -o #{log_dir} -V -cwd -b y -N realignment_#{job_prefix} -l h_vmem=4.5G -hold_jid prep_realignment_#{job_prefix} #{account} \
59
71
  #{gatk} \
60
72
  -I #{read_bam} \
61
73
  -R #{index_fa} \
metadata CHANGED
@@ -1,25 +1,35 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mutations_caller_pipeline_aws
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.12
3
+ version: !ruby/object:Gem::Version
4
+ hash: 5
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 13
10
+ version: 0.0.13
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Kaharina Hayer
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-01-20 00:00:00.000000000Z
17
+
18
+ date: 2012-01-20 00:00:00 -05:00
19
+ default_executable:
13
20
  dependencies: []
21
+
14
22
  description: Using BWA to align and GATK to call the bases
15
- email:
23
+ email:
16
24
  - katharinaehayer@gmail.com
17
- executables:
25
+ executables:
18
26
  - mutations_caller_pipeline_aws
19
27
  - gatk_pipe_only_aws
20
28
  extensions: []
29
+
21
30
  extra_rdoc_files: []
22
- files:
31
+
32
+ files:
23
33
  - bin/gatk_pipe_only_aws
24
34
  - bin/mutations_caller_pipeline_aws
25
35
  - lib/mutations_caller_pipeline_aws.rb
@@ -28,28 +38,39 @@ files:
28
38
  - lib/mutations_caller_pipeline_aws/gatk_caller.rb
29
39
  - lib/mutations_caller_pipeline_aws/location_file.rb
30
40
  - lib/mutations_caller_pipeline_aws/samtools_indexing.rb
41
+ has_rdoc: true
31
42
  homepage: https://github.com/khayer/mutations_caller_pipeline_aws
32
43
  licenses: []
44
+
33
45
  post_install_message:
34
46
  rdoc_options: []
35
- require_paths:
47
+
48
+ require_paths:
36
49
  - lib
37
- required_ruby_version: !ruby/object:Gem::Requirement
50
+ required_ruby_version: !ruby/object:Gem::Requirement
38
51
  none: false
39
- requirements:
40
- - - ! '>='
41
- - !ruby/object:Gem::Version
42
- version: '0'
43
- required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
60
  none: false
45
- requirements:
46
- - - ! '>='
47
- - !ruby/object:Gem::Version
48
- version: '0'
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 0
67
+ version: "0"
49
68
  requirements: []
69
+
50
70
  rubyforge_project: mutations_caller_pipeline_aws
51
- rubygems_version: 1.8.10
71
+ rubygems_version: 1.6.2
52
72
  signing_key:
53
73
  specification_version: 3
54
74
  summary: Call Mutations for files.fq
55
75
  test_files: []
76
+