# HG changeset patch # User francesco_lapi # Date 1741101393 0 # Node ID 70b2bff188dd8ab502d9e11be92eb6433733657b # Parent 91ad9bf5a7344caf702ec9077963087870123f99 Uploaded diff -r 91ad9bf5a734 -r 70b2bff188dd COBRAxy/ras_generator.py --- a/COBRAxy/ras_generator.py Tue Mar 04 15:07:43 2025 +0000 +++ b/COBRAxy/ras_generator.py Tue Mar 04 15:16:33 2025 +0000 @@ -221,9 +221,12 @@ collections.Counter(gene[gene.columns[0]]).items() if count > 1] pat_dup = [item for item, count in collections.Counter(list(gene.columns)).items() if count > 1] + + gene_in_rule = None if gene_dup: if gene_custom == None: + if args.rules_selector == 'HMRcore': gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/HMRcore_genes.p', 'rb')) @@ -233,16 +236,13 @@ elif args.rules_selector == 'ENGRO2': gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) - gene_in_rule = pk.load(open(args.tool_dir + '/local/pickle files/ENGRO2_genes.p', 'rb')) + utils.logWarning(f"{args.tool_dir}'/local/pickle files/ENGRO2_genes.p'", ARGS.out_log) - print(gene_in_rule) - print(f"{args.tool_dir}/local/pickle files/ENGRO2_genes.p") - utils.logWarning(f"{args.tool_dir}'/local/pickle files/ENGRO2_genes.p'", ARGS.out_log) - print(args.rules_selector) gene_in_rule = gene_in_rule.get(type_gene) else: gene_in_rule = gene_custom + tmp = [] for i in gene_dup: if gene_in_rule.get(i) == 'ok':