コード例 #1
0
 def test_summarize_annovar3(self):
     self.individual_debug = True
     """ to test if summarize can run for one whole vcf file """
     self.init_test(self.current_func_name)
     test_tabix_file = os.path.join(self.data_dir,
                                    self.current_func_name + '.vcf.gz')
     test_working_dir = self.working_dir
     test_out_prefix = 'test_summarize_annovar3_out'
     summarize_annovar(test_tabix_file,
                       test_working_dir,
                       test_out_prefix,
                       )
     expected_tmp_avdb_file = os.path.join(self.data_dir,
                                           'expected_tmp_avdb3')
     tmp_avdb_file = os.path.join(test_working_dir,
                                  test_out_prefix + '_tmp_avdb')
     self.assertTrue(filecmp.cmp(tmp_avdb_file, 
                                 expected_tmp_avdb_file),
                     "avdb file is incorrectly prepared")
     expected_avdb_file = os.path.join(self.data_dir,
                                       'expected_avdb3')
     avdb_file = os.path.join(test_working_dir,
                              test_out_prefix + '.avdb')
     self.assertTrue(filecmp.cmp(avdb_file, 
                                 expected_avdb_file),
                     "avdb file is incorrectly produced")
     expected_tab_csv_file = os.path.join(self.data_dir,
                                          'expected_tab_csv3')
     tab_csv_file = os.path.join(test_working_dir,
                                 test_out_prefix + '.tab.csv')
     self.assertTrue(filecmp.cmp(tab_csv_file, 
                                 expected_tab_csv_file),
                     "incorrect csv output file")
コード例 #2
0
def generate_summarize_annovar_db_chr9_axeq():
    summarize_annovar(
        '9',
        '1',
        '106000000',
        AXEQ_VCF_TABIX_FILE,
        GLOBAL_WORKING_DIR,
        'chr9_axeq',
    )
コード例 #3
0
def generate_summarize_annovar_db(chrom, begin_marker, end_marker,
                                  tabix_vcf_file, working_dir, out_prefix):
    (begin_pos, end_pos) = get_region_chrom(
        chrom,
        begin_marker,
        end_marker,
        REF_DB_FILE_PREFIX,
    )
    summarize_annovar(chrom, begin_pos, end_pos, tabix_vcf_file, working_dir,
                      out_prefix)
コード例 #4
0
    def test_summarize_annovar2(self):
#        self.individual_debug = True
        self.init_test(self.current_func_name)
        test_chrom = '18'
        test_begin_pos = '12512250'
        test_end_pos = '14513600'
        test_tabix_file = os.path.join(self.data_dir,
                                       self.current_func_name + '.vcf.gz')
        test_working_dir = self.working_dir
        test_out_prefix = 'test_summarize_annovar2_out'
        summarize_annovar(test_tabix_file,
                          test_working_dir,
                          test_out_prefix,
                          test_chrom,
                          test_begin_pos,
                          test_end_pos,
                          )
        expected_tmp_avdb_file = os.path.join(self.data_dir,
                                              'expected_tmp_avdb2')
        tmp_avdb_file = os.path.join(test_working_dir,
                                     test_out_prefix + '_tmp_avdb')
        self.assertTrue(filecmp.cmp(tmp_avdb_file, 
                                    expected_tmp_avdb_file),
                        "avdb file is incorrectly prepared")
        expected_avdb_file = os.path.join(self.data_dir,
                                          'expected_avdb2')
        avdb_file = os.path.join(test_working_dir,
                                 test_out_prefix + '.avdb')
        self.assertTrue(filecmp.cmp(avdb_file, 
                                    expected_avdb_file),
                        "avdb file is incorrectly produced")
        expected_tab_csv_file = os.path.join(self.data_dir,
                                             'expected_tab_csv2')
        tab_csv_file = os.path.join(test_working_dir,
                                    test_out_prefix + '.tab.csv')
        self.assertTrue(filecmp.cmp(tab_csv_file, 
                                    expected_tab_csv_file),
                        "incorrect csv output file")
コード例 #5
0
def generate_summarize_annovar_db(tabix_vcf_file, out_prefix, chrom, begin_marker, end_marker):
    if chrom != "":
        (begin_pos, end_pos) = get_region_chrom(chrom, begin_marker, end_marker, REF_DB_FILE_PREFIX)
    summarize_annovar(tabix_vcf_file, GLOBAL_WORKING_DIR, out_prefix, chrom, begin_pos, end_pos)
コード例 #6
0
def generate_summarize_annovar_db_scilife():
    summarize_annovar(SCILIFE_VCF_TABIX_FILE, GLOBAL_WORKING_DIR, "scilife")
コード例 #7
0
def generate_summarize_annovar_db_chr9_axeq():
    summarize_annovar(AXEQ_VCF_TABIX_FILE, GLOBAL_WORKING_DIR, "chr9_axeq", "9", "1", "106000000")