Mercurial > repos > bimib > cobraxy
comparison COBRAxy/ras_generator.py @ 259:91ad9bf5a734 draft
Uploaded
| author | francesco_lapi |
|---|---|
| date | Tue, 04 Mar 2025 15:07:43 +0000 |
| parents | 466172709d68 |
| children | 70b2bff188dd |
comparison
equal
deleted
inserted
replaced
| 258:466172709d68 | 259:91ad9bf5a734 |
|---|---|
| 219 | 219 |
| 220 gene_dup = [item for item, count in | 220 gene_dup = [item for item, count in |
| 221 collections.Counter(gene[gene.columns[0]]).items() if count > 1] | 221 collections.Counter(gene[gene.columns[0]]).items() if count > 1] |
| 222 pat_dup = [item for item, count in | 222 pat_dup = [item for item, count in |
| 223 collections.Counter(list(gene.columns)).items() if count > 1] | 223 collections.Counter(list(gene.columns)).items() if count > 1] |
| 224 gene_in_rule = None | 224 |
| 225 if gene_dup: | 225 if gene_dup: |
| 226 if gene_custom == None: | 226 if gene_custom == None: |
| 227 if args.rules_selector == 'HMRcore': | 227 if args.rules_selector == 'HMRcore': |
| 228 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/HMRcore_genes.p', 'rb')) | 228 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/HMRcore_genes.p', 'rb')) |
| 229 | 229 |
| 230 elif args.rules_selector == 'Recon': | 230 elif args.rules_selector == 'Recon': |
| 231 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/Recon_genes.p', 'rb')) | 231 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/Recon_genes.p', 'rb')) |
| 232 | 232 |
| 233 elif args.rules_selector == 'ENGRO2': | 233 elif args.rules_selector == 'ENGRO2': |
| 234 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) | 234 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) |
| 235 print(pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb'))) | 235 |
| 236 gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) | |
| 237 | |
| 236 print(gene_in_rule) | 238 print(gene_in_rule) |
| 237 print(f"{args.tool_dir}/local/pickle files/ENGRO2_genes.p") | 239 print(f"{args.tool_dir}/local/pickle files/ENGRO2_genes.p") |
| 238 utils.logWarning(f"{args.tool_dir}'/local/pickle files/ENGRO2_genes.p'", ARGS.out_log) | 240 utils.logWarning(f"{args.tool_dir}'/local/pickle files/ENGRO2_genes.p'", ARGS.out_log) |
| 239 print(args.rules_selector) | 241 print(args.rules_selector) |
| 240 gene_in_rule = gene_in_rule.get(type_gene) | 242 gene_in_rule = gene_in_rule.get(type_gene) |
