Mercurial > repos > bimib > marea
comparison Marea/ras_generator.py @ 77:3b0e71e28c0b draft
Fix custom rules not in xml
author | bimib |
---|---|
date | Sun, 03 Jan 2021 21:45:12 +0000 |
parents | 3af9d394367c |
children |
comparison
equal
deleted
inserted
replaced
76:3f144565551f | 77:3b0e71e28c0b |
---|---|
428 warnings.simplefilter('ignore') | 428 warnings.simplefilter('ignore') |
429 recon = cb.io.read_sbml_model(data) | 429 recon = cb.io.read_sbml_model(data) |
430 react = recon.reactions | 430 react = recon.reactions |
431 rules = [react[i].gene_reaction_rule for i in range(len(react))] | 431 rules = [react[i].gene_reaction_rule for i in range(len(react))] |
432 ids = [react[i].id for i in range(len(react))] | 432 ids = [react[i].id for i in range(len(react))] |
433 except cb.io.sbml3.CobraSBMLError: | 433 except: |
434 try: | 434 try: |
435 data = (pd.read_csv(data, sep = '\t', dtype = str, engine='python')).fillna('') | 435 data = (pd.read_csv(data, sep = '\t', dtype = str, engine='python')).fillna('') |
436 if len(data.columns) < 2: | 436 if len(data.columns) < 2: |
437 sys.exit('Execution aborted: wrong format of '+ | 437 sys.exit('Execution aborted: wrong format of '+ |
438 'custom datarules\n') | 438 'custom datarules\n') |