def build_one_list_args(parser, default_background_strategy='regulatory'): parser.add_argument( '-o', '--output_prefix', required=False, type=is_valid_prefix, help='Output file prefix. If left empty, will write results to stdout.' ) parser.add_argument( '--background_strategy', choices=public_config.get('lisa_params', 'background_strategies').split(','), default=default_background_strategy, help= """Background genes selection strategy. LISA samples background genes to compare to user\'s genes-of-interest from a diverse regulatory background (regulatory - recommended), randomly from all genes (random), or uses a user-provided list (provided). """) background_genes_group = parser.add_mutually_exclusive_group() background_genes_group.add_argument( '--background_list', type=argparse.FileType('r', encoding='utf-8'), required=False, help= 'user-supplied list of backgroung genes. Used when --background_strategy flag is set to "provided"' ) background_genes_group.add_argument( '-b', '--num_background_genes', type=int, default=public_config.get('lisa_params', 'background_genes'), help= 'Number of sampled background genes to compare to user-supplied genes') parser.add_argument('-v', '--verbose', type=int, default=4)
def build_multiple_lists_args(parser): parser.add_argument( 'query_lists', type=argparse.FileType('r', encoding='utf-8'), nargs="+", help= 'user-supplied gene lists. One gene per line in either symbol or refseqID format' ) parser.add_argument('-o', '--output_prefix', required=True, type=is_valid_prefix, help='Output file prefix.') parser.add_argument('-v', '--verbose', type=int, default=2) parser.add_argument( '-b', '--num_background_genes', type=int, default=public_config.get('lisa_params', 'background_genes'), help= 'Number of sampled background genes to compare to user-supplied genes. These genes are selection from other gene lists.' ) parser.add_argument( '--random_background', action='store_const', const='random', default='regulatory', dest='background_strategy', help= 'Use random background selection rather than "regulatory" selection.')
def build_from_genes_args(parser, add_assays=True): #parser.add_argument('-c','--cores', required = True, type = int) if add_assays: parser.add_argument( '-a', '--assays', nargs='+', default=['Direct', 'H3K27ac', 'DNase'], choices=['Direct', 'H3K27ac', 'DNase'], help='Which set of insilico-deletion assays to run.') parser.add_argument( '--rp_map_style', dest='rp_map', choices=public_config.get('lisa_params', 'rp_map_styles').split(','), default=public_config.get('lisa_params', 'rp_map_styles').split(',')[0], help= 'Which style of rp_map to assess influence of regions on genes. "basic" is stricly distance-based, while "enhanced" masks the exon and promoter regions of nearby genes.' )