def test_all_orgs():
    """ pycyc.all_orgs """
    orgs = pycyc.all_orgs() # list of strings
    for org in orgs:
        assert org.islower()
        assert not org.endswith('base')
Beispiel #2
0
p_ignored = open("pathways_ignored", "w")
m_generic = open("harmul_generics", "w")
mass_balance = open("mass_balance", "w")
p_ignored_set = {}  # dictionary of ignored pathways and blocking metabolites
r_ignored_set = set()  # set of ignored reactions
m_generic_set = {}  # dictionary of generic metabolites and how often they lead to a ignored reaction
p_generic_set = {}  # dictionary of ignored pathways and how much ignored generic metabolites are responsible
r_generic = 0  # count generic reactions
r_total = 0  # count reactions


#
# I. input
#

print pycyc.all_orgs()

answer_org = raw_input("Which Organism shoulb be exportet to sbml? ")
org = pycyc.open(answer_org)
print "Loading", answer_org, "with", len(org.all_rxns(":all")), "reactions"

formula_dic = cyc.get_formula("./conf/formula.txt")  # dictionary additional chemical formula for compounds
ec_dic = cyc.get_ec_dic("db/ec-names_brenda.txt")  # dictionary with ec numbers and reaction names

answer_generic = raw_input(
    "\nDo you want to take care of generic metabolites (e.g. tRNA, carboxylates)?\n All subclasses of a generic metabolite will be searched for instances (that is specific metabolites) and specific reactions (could be much more!) will be added instead of the generic one\n [y/n] "
)
care_generics = True if answer_generic == "y" else False
if care_generics:
    answer_exceptions = raw_input(
        "\nAre some metabolites (./conf/exceptions.txt) to be kept even if they are generic metabolites? This could be usefull e.g. to summarize lipid metabolism.\n [y/n] "