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 forReturns: list of observed_result Return type: list
ofdata_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 segmentReturns: Returns the query for a protein, sequence position, and score Return type: list
oftuple
-
-
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
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
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 proteinReturns: 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 proteinReturns: 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 proteinReturns: 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 proteinReturns: 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 proteinReturns: query for matching abundance rows Return type: sqlalchemy.orm.query.Query
-
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 forReturns: 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 forReturns: 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 forReturns: list of Protein Complexes Return type: list
ofdata_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 forReturns: list of Observed Protein Interactions Return type: list
ofdata_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 forReturns: list of Protein Subunits Return type: list
ofdata_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 forReturns: list of Protein Interactions Return type: list
ofdata_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 forReturns: 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
- Find kinetics observed for the reaction or similar reactions
- Find kinetics observed for the reaction
- Find the metabolite(s) of each participant
- Find the reaction(s) which contain all of these metabolites
- Find the kinetic laws associated with these reactions
- Find kinetics observed for similar reactions
- Find kinetics observed for the assigned EC number(s)
- Find kinetics observed for EC number(s) predicted by tools such as E-zyme
- Filter out observations from disimilar genetic and environmental conditions and rank the remaing observations by their similarity to the desired genetic and environmental conditions
- 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
ofmodels.Reaction
: ): list of reaction participantsReturns: 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
ofstr
) – 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
- ec_numbers (
-
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) – ifTrue
, 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
- structure (
-
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
ofdata_model.ReactionParticipant
) – list of reaction participants - only_formula_and_connectivity (
bool
, optional) – ifTrue
, find kinetic laws which contain species with the same InChI formula and connectivity layers - include_water_hydrogen (
bool
, optional) – ifTrue
, 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
ofmodels.KineticLaw
- participants (
-
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 forReturns: a list kinetic laws that contain all of the participants Return type: list
ofmodels.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) – ifTrue
, 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
- structure (
-
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) – ifTrue
, get metabolites which only have the same core empirical formula and core atom connecticity. ifFalse
, get metabolites with the identical structure.
Returns: query for matching metabolites
Return type: sqlalchemy.orm.query.Query
- inchi (
-
get_observed_result
(reaction)[source]¶ Find observed kinetics for the reaction or similar reactions TODO: Add compartment infomrmation
- Find kinetics observed for the reaction
- Find the metabolite(s) of each participant
- Find the reaction(s) which contain all of these metabolites
- Find the kinetic laws associated with these reactions
- Find kinetics observed for similar reactions
- Find kinetics observed for the assigned EC number(s)
- Find kinetics observed for EC number(s) predicted by tools such as E-zyme
Parameters: reaction ( data_model.Reaction
) – reaction to find data forReturns: list of relevant observed values Return type: list
ofdata_model.ObservedValue
-
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 forReturns: reaction to find data for Return type: data_model.Reaction
4.1.1.1.1.2.7. datanator.api.query.text_search module¶
Test of common schema
Author: | Saahith Pochiraju <saahith116@gmail.com> |
---|---|
Date: | 2017-12-18 |
Copyright: | 2017, Karr Lab |
License: | MIT |
-
class
datanator.api.query.text_search.
TextSearchSession
(db_cache_dirname='/root/project')[source]¶ Bases:
object
Represents a text search through the database grabbing relevant information
-
return_search
(string)[source]¶ Collects and creates dictionary of all Database objects coming up in a full text search for related string
Parameters: ( (string) – obj :str): item to be searched for Returns: List of ranked collected items from text search dict_db_models ( dict
): Dictionary of collected items from text searchReturn type: list_db_models ( list
)
-