4.1.1.1.1.2. datanator.api.query package

4.1.1.1.1.2.1. Submodules

4.1.1.1.1.2.2. datanator.api.query.dna_protein_interactions module

Author:Saahith Pochiraju <saahith116@gmail.com>
Date:2017-09-28
Copyright:2017, Karr Lab
License:MIT
class datanator.api.query.dna_protein_interactions.DNAtoProteinInteractionQuery(taxon=None, max_taxon_dist=None, taxon_dist_scale=None, include_variants=False, temperature=37.0, temperature_std=1.0, ph=7.5, ph_std=0.3, cache_dirname=None)[source]

Bases: datanator.core.data_query.CachedDataSourceQueryGenerator

Queries DNA reigons for relevant proteins

get_observed_result(DnaSpecie)[source]

Find observed concentrations for the metabolite or similar metabolites

NOTE: Currently there are no Gene objects in common schema models. When added this query will be updated to input models.Gene and output data_model.ProteinSpecie

Parameters:specie (data_model.DnaSpecie) – species to find data for
Returns:list of observed_result
Return type:list of data_model.Observable
get_protein_by_DNA_sequence(sequence, select=<class 'datanator.core.models.ProteinSubunit'>)[source]

NOTE: Currently there are no Gene objects in common schema models. When added this query will be updated to input models.Gene and output data_model.ProteinSpecie

Parameters:sequence (data_model.DnaSpecie.sequence) – sequence of DNA segment
Returns:Returns the query for a protein, sequence position, and score
Return type:list of tuple
class datanator.api.query.dna_protein_interactions.ProteintoDNAInteractionQuery(taxon=None, max_taxon_dist=None, taxon_dist_scale=None, include_variants=False, temperature=37.0, temperature_std=1.0, ph=7.5, ph_std=0.3, cache_dirname=None)[source]

Bases: datanator.core.data_query.CachedDataSourceQueryGenerator

Queries Proteins for their DNA

get_DNA_by_protein(protein, select=<class 'datanator.core.models.DNABindingData'>)[source]
Parameters:protein (models.ProteinSubunit) – protein subunit to find data for
Returns:list of versions queries for DNA binding observed for similar proteins
Return type:list of sqlalchemy.orm.query.Query
get_observed_result(protein)[source]

Find the DNA binding motif for a given protein

Parameters:protein (models.ProteinSubunit) – protein subunit to find data for
Returns:list of observables
Return type:list of data_model.Observable

4.1.1.1.1.2.3. datanator.api.query.metabolite_concentrations module

Author:Jonathan Karr <jonrkarr@gmail.com>
Author:Saahith Pochiraju <saahith116@gmail.com>
Date:2017-05-16
Copyright:2017, Karr Lab
License:MIT
class datanator.api.query.metabolite_concentrations.MetaboliteConcentrationQuery(taxon=None, max_taxon_dist=None, taxon_dist_scale=None, include_variants=False, temperature=37.0, temperature_std=1.0, ph=7.5, ph_std=0.3, cache_dirname=None)[source]

Bases: datanator.core.data_query.CachedDataSourceQueryGenerator

Finds relevant concentration observations for metabolites

get_concentration_by_structure(inchi, only_formula_and_connectivity=True, select=<class 'datanator.core.models.Concentration'>)[source]
Parameters:inchi (str) – inchi structure to find concentrations
Returns:query for matching concentration rows
Return type:sqlalchemy.orm.query.Query
get_observed_result(metabolite)[source]

Find observed concentrations for the metabolite or similar metabolites

Parameters:metabolite (models.Metabolite) – metabolite to find data for
Returns:list of relevant observations
Return type:list of data_model.ObservedValue

4.1.1.1.1.2.4. datanator.api.query.protein_abundance module

Author:Saahith Pochiraju <saahith116@gmail.com>
Date:2017-09-12
Copyright:2017, Karr Lab
License:MIT
class datanator.api.query.protein_abundance.ProteinAbundanceQuery(taxon=None, max_taxon_dist=None, taxon_dist_scale=None, include_variants=False, temperature=37.0, temperature_std=1.0, ph=7.5, ph_std=0.3, cache_dirname=None)[source]

Bases: datanator.core.data_query.CachedDataSourceQueryGenerator

Finds relevant concentration observations for proteins

get_abundance_by_entrez(entrez_id, select=<class 'datanator.core.models.AbundanceData'>)[source]

Find the abundance from uniprot

Parameters:entrez_id (str) – NCBI entrez id for a given protein
Returns:query for matching abundance rows
Return type:sqlalchemy.orm.query.Query
get_abundance_by_gene_name(gene_name, select=<class 'datanator.core.models.AbundanceData'>)[source]

Find the abundance from gene_name

Parameters:gene_name (str) – gene name for a given protein
Returns:query for matching abundance rows
Return type:sqlalchemy.orm.query.Query
get_abundance_by_length(length, select=<class 'datanator.core.models.AbundanceData'>)[source]

Find the abundance from uniprot

Parameters:length (str) – number of amino acids in a protein
Returns:query for matching abundance rows
Return type:sqlalchemy.orm.query.Query
get_abundance_by_mass(mass, select=<class 'datanator.core.models.AbundanceData'>)[source]

Find the abundance from uniprot

Parameters:mass (int) – mass of a protein
Returns:query for matching abundance rows
Return type:sqlalchemy.orm.query.Query
get_abundance_by_sequence(sequence, select=<class 'datanator.core.models.AbundanceData'>)[source]

Find the abundance from uniprot

Parameters:sequence (str) – amino acid sequence for a given protein
Returns:query for matching abundance rows
Return type:sqlalchemy.orm.query.Query
get_abundance_by_uniprot(uniprot, select=<class 'datanator.core.models.AbundanceData'>)[source]

Find the abundance from a uniprot id

Parameters:uniprot (str) – protein id from Uniprot Database
Returns:query for matching abundance rows
Return type:sqlalchemy.orm.query.Query
get_observed_result(protein)[source]

Find the observed values for protein abundance

Parameters:protein (models.ProteinSubunit) – Protein Subunit to find data for
Returns:list of relevant observed values
Return type:list of data_model.ObservedValue

4.1.1.1.1.2.5. datanator.api.query.protein_protein_interactions module

Author:Saahith Pochiraju <saahith116@gmail.com>
Date:2018-05-10
Copyright:2017, Karr Lab
License:MIT
class datanator.api.query.protein_protein_interactions.ProteinInteractionandComplexQuery(taxon=None, max_taxon_dist=None, taxon_dist_scale=None, include_variants=False, temperature=37.0, temperature_std=1.0, ph=7.5, ph_std=0.3, cache_dirname=None)[source]

Bases: datanator.core.data_query.CachedDataSourceQueryGenerator

Queries Proteins to find Interactions with other Proteins

get_interaction_by_subunit(uniprot, select=<class 'datanator.core.models.ProteinInteraction'>)[source]

Get interactions that were observed for a given uniprot id

Parameters:uniprot (str) – uniprot id to search for
Returns:query for protein interactions that contain the uniprot_id
Return type:sqlalchemy.orm.query.Query
get_known_complex_by_subunit(uniprot, select=<class 'datanator.core.models.ProteinComplex'>)[source]

Get known complexes that were observed for a given uniprot id subunit

Parameters:uniprot (str) – uniprot id to search for
Returns:query for protein complexes that contain the uniprot_id
Return type:sqlalchemy.orm.query.Query
get_observable_complex(protein_subunit)[source]

Get known protein complex that were observed for a given subunit

Parameters:protein_subunit (models.ProteinSubunit) – subunit to find complex for
Returns:list of Protein Complexes
Return type:list of data_model.ObservedSpecie
get_observable_interactions(protein_subunit)[source]

Get known protein interactions that were observed for a given subunit

Parameters:protein_subunit (models.ProteinSubunit) – subunit to find interactions for
Returns:list of Observed Protein Interactions
Return type:list of data_model.ObservedInteraction
get_observable_subunits(protein_complex)[source]

Get known protein subunit that were observed for a given protein complex

Parameters:protein_subunit (models.ProteinComplex) – complex to find subunits for
Returns:list of Protein Subunits
Return type:list of data_model.ObservedSpecie
get_observed_result(component)[source]

Get known observed interactions, complexes, or subunits for a given component

Parameters:component (models.ProteinSubunit) or (models.ProteinComplex) – subunit or complex to find interactions for
Returns:list of Protein Interactions
Return type:list of data_model.SpecieInteraction
get_subunits_by_known_complex(complex_name, select=<class 'datanator.core.models.ProteinSubunit'>)[source]

Get known protein subunits that were observed for a given complex

Parameters:complex_name (str) – complex to find subunits for
Returns:query for protein subunits that are within the given protein complex
Return type:sqlalchemy.orm.query.Query

4.1.1.1.1.2.6. datanator.api.query.reaction_kinetics module

Author:Yosef Roth <yosefdroth@gmail.com>
Author:Jonathan Karr <jonrkarr@gmail.com>
Author:Saahith Pochiraju <saahith116@gmail.com>
Date:2017-05-16
Copyright:2017, Karr Lab
License:MIT
class datanator.api.query.reaction_kinetics.ReactionKineticsQuery(taxon=None, max_taxon_dist=None, taxon_dist_scale=None, include_variants=False, temperature=37.0, temperature_std=1.0, ph=7.5, ph_std=0.3, cache_dirname=None)[source]

Bases: datanator.core.data_query.CachedDataSourceQueryGenerator

Finds relevant kinetics observations for reactions

  1. Find kinetics observed for the reaction or similar reactions
  1. Find kinetics observed for the reaction
  1. Find the metabolite(s) of each participant
  2. Find the reaction(s) which contain all of these metabolites
  3. Find the kinetic laws associated with these reactions
  1. Find kinetics observed for similar reactions
  1. Find kinetics observed for the assigned EC number(s)
  2. Find kinetics observed for EC number(s) predicted by tools such as E-zyme
  1. Filter out observations from disimilar genetic and environmental conditions and rank the remaing observations by their similarity to the desired genetic and environmental conditions
  2. Calculate a statistical representation of the relevant observations
convert_rxn_to_data_model(reaction_list)[source]

Converts SQL model reaction into a Obj Model based data_model reaction

:param reaction_list list of models.Reaction: ): list of reaction participants

Returns:a cohesive reaction data object
Return type:data_model.Reaction
get_kinetic_laws_by_ec_numbers(ec_numbers, match_levels=4, select=<class 'datanator.core.models.KineticLaw'>)[source]

Get kinetic laws which have one of a list of EC numbers or, optionally, belong to one of a list of EC classes.

Parameters:
  • ec_numbers (list of str) – EC numbers to search for
  • match_levels (int) – number of EC levels that the EC number must match
Returns:

query for matching kinetic laws

Return type:

sqlalchemy.orm.query.Query

get_kinetic_laws_by_metabolite(metabolite, role='reactant', select=<class 'datanator.core.models.KineticLaw'>)[source]

Get kinetic laws that contain a structure in role role

Parameters:
  • structure (str) – InChI structure or formula and connectivity layers to search for
  • only_formula_and_connectivity (bool, optional) – if True, find kinetic laws which contain species with the same InChI formula and connectivity layers
  • role (str, optional) – role (reactant, or product) to search for species
Returns:

query for kinetic laws that contain the structure in role role

Return type:

sqlalchemy.orm.query.Query

get_kinetic_laws_by_participants(participants, only_formula_and_connectivity=False, include_water_hydrogen=False, select=<class 'datanator.core.models.KineticLaw'>)[source]

Get kinetic laws with the participants participants

Parameters:
  • participants (list of data_model.ReactionParticipant) – list of reaction participants
  • only_formula_and_connectivity (bool, optional) – if True, find kinetic laws which contain species with the same InChI formula and connectivity layers
  • include_water_hydrogen (bool, optional) – if True, restrict kinetic laws based on their water, hydroxide, and hydrogen participants
Returns:

a list kinetic laws that contain all of the participants

Return type:

list of models.KineticLaw

get_kinetic_laws_by_reaction(reaction, select=<class 'datanator.core.models.KineticLaw'>)[source]

Get kinetic laws that were observed for similar reactions (same participants or same EC class)

Parameters:reaction (data_model.Reaction) – reaction to find data for
Returns:a list kinetic laws that contain all of the participants
Return type:list of models.KineticLaw
get_kinetic_laws_by_structure(structure, only_formula_and_connectivity=False, role='reactant', select=<class 'datanator.core.models.KineticLaw'>)[source]

Get kinetic laws that contain a structure in role role

Parameters:
  • structure (str) – InChI structure or formula and connectivity layers to search for
  • only_formula_and_connectivity (bool, optional) – if True, find kinetic laws which contain species with the same InChI formula and connectivity layers
  • role (str, optional) – role (reactant, or product) to search for species
Returns:

query for kinetic laws that contain the structure in role role

Return type:

sqlalchemy.orm.query.Query

get_metabolites_by_structure(inchi, only_formula_and_connectivity=False, select=<class 'datanator.core.models.Metabolite'>)[source]

Get metabolites with the same structure. Optionally, get metabolites which only have the same core empirical formula and core atom connecticity (i.e. same InChI formula and connectivity layers).

Parameters:
  • inchi (str) – molecule structure in InChI format
  • only_formula_and_connectivity (bool, optional) – if True, get metabolites which only have the same core empirical formula and core atom connecticity. if False, get metabolites with the identical structure.
Returns:

query for matching metabolites

Return type:

sqlalchemy.orm.query.Query

get_observed_result(reaction)[source]

Find observed kinetics for the reaction or similar reactions TODO: Add compartment infomrmation

  1. Find kinetics observed for the reaction
  1. Find the metabolite(s) of each participant
  2. Find the reaction(s) which contain all of these metabolites
  3. Find the kinetic laws associated with these reactions
  1. Find kinetics observed for similar reactions
  1. Find kinetics observed for the assigned EC number(s)
  2. Find kinetics observed for EC number(s) predicted by tools such as E-zyme
Parameters:reaction (data_model.Reaction) – reaction to find data for
Returns:list of relevant observed values
Return type:list of data_model.ObservedValue
get_reaction_by_kinetic_law_id(id)[source]
get_reaction_by_metabolite(metabolite, select=<class 'datanator.core.models.Reaction'>)[source]

Get reaction that contains the metabolite role models.Metabolite

Parameters:structure (models.Metabolite) – InChI structure or formula and connectivity layers to search for
Returns:reaction to find data for
Return type:data_model.Reaction

4.1.1.1.1.2.8. Module contents