4.1.1.4. datanator.schema_2 package

4.1.1.4.1. Submodules

4.1.1.4.2. datanator.schema_2.migrate_corum module

4.1.1.4.3. datanator.schema_2.migrate_ec module

4.1.1.4.4. datanator.schema_2.migrate_metabolite_concentration module

4.1.1.4.5. datanator.schema_2.migrate_metabolites_meta module

4.1.1.4.6. datanator.schema_2.migrate_taxon_tree module

4.1.1.4.7. datanator.schema_2.migrate_uniprot module

4.1.1.4.8. datanator.schema_2.transform module

class datanator.schema_2.transform.Transform(MongoDB=None, db=None, des_col=None, username=None, password=None, max_entries=inf, verbose=True)[source]

Bases: datanator_query_python.util.mongo_util.MongoUtil

build_rna_modification_entity(obj)[source]

build entity objects from rna_modification collection

Parameters

obj (Obj) – Object from which entity will be built.

Returns

(Obj)

build_rna_modification_observation(obj)[source]

Build observation objects from rna_modification collection.

Parameters

obj (Obj) – object from which observation objects will be built.

Returns

(list of Obj)

build_rna_observation(obj)[source]

Build RNA observation object from rna_haflife_new collection.

Parameters

obj (Obj) – object to be transformed.

Returns

(list of Obj)

build_sabio_entity(obj)[source]

Build entity objects from sabio_rk_old collection.

Parameters

obj (Obj) – object from which entity objects will be built.

Returns

(Obj)

build_uniprot_entity(obj)[source]

Build entity from uniprot collection.

:param (Obj): object from which entity object will be built.

Returns

entity object.

Return type

(Obj)

build_uniprot_observation(obj)[source]

Build observation from uniprot collection.

:param (Obj): object from which observation object will be built.

Returns

observation object.

Return type

(Obj)

process_docs(col, db='datanator-test', skip=0)[source]

Processing documents and transform.

Parameters
  • col (str) – Name of the source collection.

  • db (Obj) – Name of database.

datanator.schema_2.transform.main()[source]

4.1.1.4.9. datanator.schema_2.transform_metabolite_concentrations module

class datanator.schema_2.transform_metabolite_concentrations.TMC(MongoDB=None, db=None, des_col=None, username=None, password=None, max_entries=inf, verbose=True)[source]

Bases: datanator_query_python.util.mongo_util.MongoUtil

build_conc_observation(obj)[source]

Build concentration observation object(s) from documents in metabolite_concentrations collection.

Parameters

obj (Obj) – Document.

Returns

(Iter)

process_docs(skip=0)[source]

4.1.1.4.10. datanator.schema_2.transform_metabolites_meta module

class datanator.schema_2.transform_metabolites_meta.TransformMetabolitesMeta(MongoDB=None, db=None, username=None, password=None, max_entries=inf)[source]

Bases: datanator_query_python.util.mongo_util.MongoUtil

build_entity(obj)[source]

Build entity object from obj. Go into entity collection

Parameters

obj (Obj) – source object.

Returns

(Obj), e.g. {

”entity”: {

“type”: “metabolite”, “name”: “2-Ketobutyric acid”, “synonyms”: [], “identifiers”: [{}… {}], “related”: [{“namespace”: “”, “value”: “”}]

}

}

build_obs(obj)[source]

Build observation objects from obj. Go into observations collection.

Parameters

obj (Obj) – source object.

Returns

obj(Obj) {

”entity”: “weight”, “value”: [], “source”: {}, …

}

process_docs(skip=0)[source]

4.1.1.4.11. Module contents