示例#1
0
 def test35(self):
     cur_dir = os.path.dirname(os.path.abspath(__file__))
     in_bam1 = cur_dir + "/../data/5929_tumor_small.markdup.bam"
     in_bam2 = None
     sample1 = "5929_tumor"
     sample2 = None
     out_file =  cur_dir + "/../data/5929_small_mutation_result_test35.txt"
     ref_fa  = cur_dir + "/../data/GRCh37.fa"
     baseq_thres = 15
     mismatch_rate_disease = 0.02
     mismatch_rate_normal = None
     post_10_q = 0.02
     fisher_threshold = None
     min_depth = 8
     header_flag = False
     min_variant_read = 4
     samtools = self.samtools
     samtools_params = "-q 20 -BQ0 -d 10000000 --ff UNMAP,SECONDARY,QCFAIL,DUP"
     region = None
     region_file = cur_dir + "/../data/GRCh37_2split.interval_list"
     positions_bed = None
     is_anno = False
     fisher.Pileup_and_count(in_bam1, in_bam2, sample1, sample2, out_file, ref_fa,
     baseq_thres, mismatch_rate_disease, mismatch_rate_normal, post_10_q,
     fisher_threshold, min_depth, header_flag, min_variant_read, samtools,
     samtools_params, region, region_file, positions_bed, is_anno
     )
     answer_file = cur_dir + "/../data/5929_small_mutation_result_answer_test35.txt"
     self.assertTrue(filecmp.cmp(out_file, answer_file, shallow=False))
示例#2
0
 def test21(self):
     cur_dir = os.path.dirname(os.path.abspath(__file__))
     in_bam1 = cur_dir + "/../data/5929_tumor_small.markdup.bam"
     in_bam2 = cur_dir + "/../data/5929_control_small.markdup.bam"
     sample1 = "5929_tumor"
     sample2 = "5929_control"
     out_file =  cur_dir + "/../data/5929_small_mutation_result_test21.txt"
     ref_fa  = cur_dir + "/../data/GRCh37.fa"
     baseq_thres = 15
     mismatch_rate_disease = 0.07
     mismatch_rate_normal = 0.1
     post_10_q = None
     fisher_threshold = 0.05
     min_depth = 10
     header_flag = True
     min_variant_read = 4
     samtools = self.samtools
     samtools_params = "-q 30 -BQ0 -d 10000000"
     region = None
     region_file = None
     positions_bed = None
     is_anno = False
     fisher.Pileup_and_count(in_bam1, in_bam2, sample1, sample2, out_file, ref_fa,
     baseq_thres, mismatch_rate_disease, mismatch_rate_normal, post_10_q,
     fisher_threshold, min_depth, header_flag, min_variant_read, samtools,
     samtools_params, region, region_file, positions_bed, is_anno
     )
     answer_file = cur_dir + "/../data/5929_small_mutation_result_answer_test21.txt"
     self.assertTrue(filecmp.cmp(out_file, answer_file, shallow=False))