"""                    TD PART II :
#################################################################
    STUDY OF THE STRUCTURE OF A GENOME SCALE METABOLIC MODEL
From the given function and the information you got about the cobra language,
try to answer the following questions.
files: functions.txt
       metabolic_models.pptx
model : study_model.xml
model2 : ####you can chose####
For a better understanding, you can also open the file functions.py to see how some function are built.
During this tutorial you will use object oriented-language.
"""
#####A
#0 installation : from cmd window 'pip install cobra[all]'

#1- Load needed module
from functions import *
#2- Load the study_model


#3- How many metabolites?


#4- How many reactions?


#5- How many genes 

      
#6- Which compartments?

      
#7- Print the stoichiometric matrix

      
#8- From the stoichiometric matrix, draw the model.

      
#9- Identify the external, transport, sink, demand, biomass reactions manually and via a command line.


#10- Select a reaction. Print information about it. It is a reversible reaction? Print bounds of the reaction. 


#11- Print a metabolite formula, name. Print reactions which involve specific metabolite (and if possible the reaction associated).

#12- What is the objective function? Can you show the objective coefficient for each reactions?


#####B  Answer the same question with a model of your taste on Bigg Models

#13- Download a model from BiGG models database

#14- Import the model:

#15- How many reactions?

#16- how many metabolites?

#17- Wich compartments?

#18- Stoichiometric Matrix (show limited at 500/500):

#19- How many exchange reactions?

#20- How many sink reactions?

#21- How many demand reactions?

#22- What is the objective function? Maximise or minimize?







