This notebook demonstrates loading and unloading of datasets into the OME Framework


  1. Import the data_loading module from ome.loading along with the datasets module

In [1]:
from ome.loading import data_loading
from ome.data import *

Also don't forget to create a session for the database


In [1]:
from ome import base

session = base.Session()

In [3]:
data_loading.load_extra_analyses


Out[3]:
<function ome.wrapper>

In [ ]:


In [ ]:

Loading groups


In [6]:
from ome import util
from ome.components import *

ecoli_k12 = session.query(base.Chromosome).filter(base.Chromosome.ncbi_id == 'NC_000913.2').one()
util.add_gene_group('fermentation_targets', ['adhE','hyfA','pdhR'], ecoli_k12)
util.add_gene_group('aa_biosynth', ['leuA','tyrB','pheA','aroH'], ecoli_k12)

In [7]:
session.query(GeneGroup).all()


Out[7]:
[Gene Group (#1, fermentation_targets): adhE, hyfA, pdhR,
 Gene Group (#2, aa_biosynth): leuA, tyrB, pheA, aroH]

In [10]:
gg = session.query(GeneGroup).first()
session.delete(gg)

In [11]:
session.query(GeneGroup).all()


Out[11]:
[Gene Group (#2, aa_biosynth): leuA, tyrB, pheA, aroH]

In [ ]: