changeset 260:70b2bff188dd draft

Uploaded
author francesco_lapi
date Tue, 04 Mar 2025 15:16:33 +0000
parents 91ad9bf5a734
children 1df2d8de156f
files COBRAxy/ras_generator.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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':