def filter_call(sample): if mglobals.original: os.chdir(join(mglobals.original_path, sample)) else: os.chdir(join(mglobals.alternate_path, sample)) log.info("Filtering {0} by coverage".format(sample)) helpers.filter_vcf_by_coverage_cutoffs(vcf=(sample + in_file_extension), cutoff_table=mglobals.coverage_cutoffs) log.info("Filtering {0} according to SNP file: {1}".format(sample, mglobals.current_snp_file)) dgrp_intersect_command = [ "nice", "-n", "5", "intersectBed", "-a", (sample + "_covfil.vcf"), # the output of the helper # function above. "-b", mglobals.current_snp_file, "-wa", ] sample_dgrp_intersect = sample + out_file_extension with open(sample_dgrp_intersect, "w") as out: helpers.sub_call(dgrp_intersect_command, stdout=out)
def filter_call(sample): if mglobals.original: os.chdir(join(mglobals.original_path, sample)) else: os.chdir(join(mglobals.alternate_path, sample)) log.info('Filtering {0} by coverage'.format(sample)) helpers.filter_vcf_by_coverage_cutoffs( vcf=(sample + in_file_extension), cutoff_table=mglobals.coverage_cutoffs) log.info('Filtering {0} according to SNP file: {1}'.format( sample, mglobals.current_snp_file)) dgrp_intersect_command = [ 'nice', '-n', '5', 'intersectBed', '-a', (sample + '_covfil.vcf'), # the output of the helper # function above. '-b', mglobals.current_snp_file, '-wa' ] sample_dgrp_intersect = sample + out_file_extension with open(sample_dgrp_intersect, 'w') as out: helpers.sub_call(dgrp_intersect_command, stdout=out)
def filter_call(sample): if mglobals.original: os.chdir(join(mglobals.original_path, sample)) else: os.chdir(join(mglobals.alternate_path, sample)) log.info('Filtering {0} by coverage'.format(sample)) helpers.filter_vcf_by_coverage_cutoffs(vcf=(sample + in_file_extension), cutoff_table=mglobals.coverage_cutoffs) os.rename((sample + '_covfil.vcf'), (sample + out_file_extension))
def filter_call(sample): if mglobals.original: os.chdir(join(mglobals.original_path, sample)) else: os.chdir(join(mglobals.alternate_path, sample)) log.info('Filtering {0} by coverage'.format(sample)) helpers.filter_vcf_by_coverage_cutoffs(vcf=(sample + in_file_extension), cutoff_table=mglobals.coverage_cutoffs) log.info('Filtering {0} according to SNP file: {1}'.format(sample, mglobals.current_snp_file)) dgrp_intersect_command = ['nice', '-n', '5', 'intersectBed', '-a', (sample + '_covfil.vcf'), # the output of the helper # function above. '-b', mglobals.current_snp_file, '-wa' ] sample_dgrp_intersect = sample + out_file_extension with open(sample_dgrp_intersect, 'w') as out: helpers.sub_call(dgrp_intersect_command, stdout=out)