Example #1
0
 def test5(self):
     cur_dir = os.path.dirname(os.path.abspath(__file__))
     tmp_dir = tempfile.mkdtemp()
     h_chrom_number = make_chrom_number_dict(cur_dir +
                                             "/data/test1_svim.txt")
     input_bedpe = cur_dir + "/data/test5_svim.txt"
     answer_file = cur_dir + "/data/test5_svim_answer.txt"
     output = tmp_dir + "/test5_svim.txt"
     with open(output, "w") as hout:
         simplify_svim(input_bedpe, hout, h_chrom_number)
Example #2
0
 def test4(self):
     cur_dir = os.path.dirname(os.path.abspath(__file__))
     tmp_dir = tempfile.mkdtemp()
     h_chrom_number = make_chrom_number_dict(cur_dir +
                                             "/data/test1_svim.txt")
     input_bedpe = cur_dir + "/data/test4_svim.txt"
     answer_file = cur_dir + "/data/test4_svim_answer.txt"
     output = tmp_dir + "/test4_svim.txt"
     with open(output, "w") as hout:
         simplify_svim(input_bedpe, hout, h_chrom_number)
     self.assertTrue(filecmp.cmp(output, answer_file, shallow=False))
     shutil.rmtree(tmp_dir)
Example #3
0
 def test7(self):
     cur_dir = os.path.dirname(os.path.abspath(__file__))
     tmp_dir = tempfile.mkdtemp()
     h_chrom_number = make_chrom_number_dict(cur_dir +
                                             "/data/test1_svim.txt")
     input_tumor_bedpe = cur_dir + "/data/test7_svim_tumor.txt"
     input_simplify_control_bedpe = cur_dir + "/data/test7_svim_control.txt.gz"
     answer_file = cur_dir + "/data/test7_svim_answer.txt"
     output = tmp_dir + "/test7_svim.txt"
     filt_clustered_rearrangement2(input_tumor_bedpe, output,
                                   input_simplify_control_bedpe, 1, 3, 0, 0,
                                   h_chrom_number)
     self.assertTrue(filecmp.cmp(output, answer_file, shallow=False))
     shutil.rmtree(tmp_dir)