Class: GatkCaller
- Inherits:
-
Object
- Object
- GatkCaller
- Defined in:
- lib/mutations_caller_pipeline/gatk_caller.rb
Class Method Summary collapse
-
.call(log_dir, gatk, index_fa, read_bam, read_vcf) ⇒ Object
INDEX is normal genom.fa.
- .prepare_realigne(log_dir, gatk, read_bam, index_fa, target_intervals) ⇒ Object
- .realigne(log_dir, gatk, read_bam, index_fa, target_intervals, realigned_bam) ⇒ Object
- .recalibrate_bam(log_dir, gatk, index_fa, index_vcf, read_bam, recal_file) ⇒ Object
- .table_calibration(log_dir, gatk, index_fa, read_bam, recal_bam, recal_file) ⇒ Object
Class Method Details
.call(log_dir, gatk, index_fa, read_bam, read_vcf) ⇒ Object
INDEX is normal genom.fa
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/mutations_caller_pipeline/gatk_caller.rb', line 3 def self.call(log_dir, gatk, index_fa, read_bam, read_vcf) cmd = "echo 'starting GATK for mutant at ' `date` >> #{log_dir} java -Xmx4g -jar #{gatk} -l INFO -R #{index_fa} -T UnifiedGenotyper \ -I #{read_bam} \ -o #{read_vcf} \ --genotype_likelihoods_model BOTH \ >> #{log_dir} 2>&1 || exit 1" puts cmd system(cmd) end |
.prepare_realigne(log_dir, gatk, read_bam, index_fa, target_intervals) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/mutations_caller_pipeline/gatk_caller.rb', line 36 def self.prepare_realigne(log_dir, gatk, read_bam, index_fa, target_intervals) cmd = "java -Xmx2g -jar #{gatk} \ -I #{read_bam} \ -R #{index_fa} \ -T RealignerTargetCreator \ -o #{target_intervals}" puts cmd system(cmd) end |
.realigne(log_dir, gatk, read_bam, index_fa, target_intervals, realigned_bam) ⇒ Object
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/mutations_caller_pipeline/gatk_caller.rb', line 46 def self.realigne(log_dir, gatk, read_bam, index_fa, target_intervals, realigned_bam) cmd = "java -Xmx4g -jar #{gatk} \ -I #{read_bam} \ -R #{index_fa} \ -T IndelRealigner \ -targetIntervals #{target_intervals} \ -o #{realigned_bam} >> #{log_dir} 2>&1 || exit 1" puts cmd system(cmd) end |
.recalibrate_bam(log_dir, gatk, index_fa, index_vcf, read_bam, recal_file) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mutations_caller_pipeline/gatk_caller.rb', line 14 def self.recalibrate_bam(log_dir ,gatk, index_fa, index_vcf, read_bam, recal_file ) cmd = "echo 'starting GATK for mutant at ' `date` >> #{log_dir} java -Xmx4g -jar #{gatk} -knownSites #{index_vcf} -I #{read_bam} \ -R #{index_fa} -T CountCovariates \ -cov ReadGroupCovariate -cov QualityScoreCovariate -cov DinucCovariate \ -cov CycleCovariate \ -recalFile #{recal_file} >> #{log_dir} 2>&1 || exit 1 " puts cmd system(cmd) end |
.table_calibration(log_dir, gatk, index_fa, read_bam, recal_bam, recal_file) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mutations_caller_pipeline/gatk_caller.rb', line 25 def self.table_calibration(log_dir, gatk, index_fa, read_bam, recal_bam, recal_file) cmd = "java -Xmx4g -jar #{gatk} \ -R #{index_fa} \ -I #{read_bam} \ -T TableRecalibration \ -o #{recal_bam} \ -recalFile #{recal_file} >> #{log_dir} 2>&1 || exit 1" puts cmd system(cmd) end |