Mercurial > repos > bimib > cobraxy
comparison COBRAxy/ras_generator.py @ 265:bae18f67004c draft
Uploaded
author | francesco_lapi |
---|---|
date | Tue, 04 Mar 2025 15:30:59 +0000 |
parents | a4f02ba0f64c |
children | 0025449eadba |
comparison
equal
deleted
inserted
replaced
264:a4f02ba0f64c | 265:bae18f67004c |
---|---|
26 usage = '%(prog)s [options]', | 26 usage = '%(prog)s [options]', |
27 description = "process some value's genes to create a comparison's map.") | 27 description = "process some value's genes to create a comparison's map.") |
28 | 28 |
29 parser.add_argument( | 29 parser.add_argument( |
30 '-rs', '--rules_selector', | 30 '-rs', '--rules_selector', |
31 type = utils.Model, default = utils.Model.HMRcore, choices = list(utils.Model), | 31 type = utils.Model, default = utils.Model.ENGRO2, choices = list(utils.Model), |
32 help = 'chose which type of dataset you want use') | 32 help = 'chose which type of dataset you want use') |
33 | 33 |
34 parser.add_argument("-rl", "--rule_list", type = str, | 34 parser.add_argument("-rl", "--rule_list", type = str, |
35 help = "path to input file with custom rules, if provided") | 35 help = "path to input file with custom rules, if provided") |
36 | 36 |
224 | 224 |
225 gene_in_rule = None | 225 gene_in_rule = None |
226 | 226 |
227 if gene_dup: | 227 if gene_dup: |
228 if gene_custom == None: | 228 if gene_custom == None: |
229 print(args.rules_selector) | 229 |
230 print(str(args.rules_selector) == 'ENGRO2') | 230 if str(args.rules_selector) == 'HMRcore': |
231 | |
232 if args.rules_selector == 'HMRcore': | |
233 print(1) | 231 print(1) |
234 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/HMRcore_genes.p', 'rb')) | 232 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/HMRcore_genes.p', 'rb')) |
235 | 233 |
236 elif args.rules_selector == 'Recon': | 234 elif str(args.rules_selector) == 'Recon': |
237 print(2) | 235 print(2) |
238 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/Recon_genes.p', 'rb')) | 236 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/Recon_genes.p', 'rb')) |
239 | 237 |
240 elif args.rules_selector == 'ENGRO2': | 238 elif str(args.rules_selector) == 'ENGRO2': |
241 print(3) | 239 print(3) |
242 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) | 240 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) |
243 | 241 |
244 utils.logWarning(f"{args.tool_dir}'/local/pickle files/ENGRO2_genes.p'", ARGS.out_log) | 242 utils.logWarning(f"{args.tool_dir}'/local/pickle files/ENGRO2_genes.p'", ARGS.out_log) |
245 | 243 |