Skip to content

main

Given the allevents file from yeastepigenome.org, which is the (parsed) output from chexmix, find the most significant peak in each interval, if a peak exists, in a set of promoter regions

Parameters:

Name Type Description Default
args Namespace

arguments from command line

required
Source code in callingcardstools/Analysis/yeast/chipexo_promoter_sig.py
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
def main(args: argparse.Namespace) -> None:
    """
    Given the allevents file from yeastepigenome.org, which is the (parsed) 
    output from chexmix, find the most significant peak in each interval,
    if a peak exists, in a set of promoter regions

    Args:
        args (argparse.Namespace): arguments from command line
    """
    check_files = [args.chipexo_data_path,
                   args.promoter_data_path,
                   args.chrmap_data_path]
    for file in check_files:
        if not os.path.isfile(file):
            raise FileNotFoundError(f'{file} not found')

    result = chipexo_promoter_sig(args.chipexo_data_path,
                                  args.chipexo_orig_chr_convention,
                                  args.promoter_data_path,
                                  args.promoter_orig_chr_convention,
                                  args.chrmap_data_path,
                                  args.unified_chr_convention)

    result.to_csv(args.output_file,
                  compression='gzip' if args.compress else None,
                  index=False)