Schema to represent a knowledge base to build models of eukaryotes
- Author:
Yin Hoon Chew <yinhoon.chew@mssm.edu>
- Date:
2018-09-10
- Copyright:
2018, Karr Lab
- License:
MIT
3.2.4. Module Contents¶
3.2.4.1. Classes¶
Activity level of regulatory element |
|
Type of regulation between a regulatory element and a gene |
|
The direction of regulation |
|
Type of transcript |
|
Start and end coordinates attribute |
|
Regulatory direction attribute |
|
Knowledge of a gene |
|
Transcription factor and the direction of transcriptional regulation |
|
Knowledge about regulatory modules |
|
Knowledge of protein modification sites |
|
Start and end coordinates of exons and CDSs |
|
Knowledge of a transcript (spliced RNA) species |
|
Knowledge of a protein monomer |
- class wc_kb.eukaryote.RegulationType[source]¶
Bases:
enum.EnumType of regulation between a regulatory element and a gene
- class wc_kb.eukaryote.RegulatoryDirection[source]¶
Bases:
int,enum.EnumThe direction of regulation
- class wc_kb.eukaryote.LocusAttribute(related_name='', verbose_name='', verbose_related_name='', description='')[source]¶
Bases:
obj_tables.ManyToManyAttributeStart and end coordinates attribute
- serialize(coordinates, encoded=None)[source]¶
Serialize related object :param coordinates: a list of instances of GenericLocus Python representation :type coordinates:
listofModel:param encoded: dictionary of objects that have already been encoded :type encoded:dict, optional- Returns:
simple Python representation
- Return type:
str
- deserialize(value, objects, decoded=None)[source]¶
Deserialize value :param value: String representation :type value:
str:param objects: dictionary of objects, grouped by model :type objects:dict:param decoded: dictionary of objects that have already been decoded :type decoded:dict, optional- Returns:
tupleof cleaned valueand cleaning error
- Return type:
tupleoflistofGenericLocus,InvalidAttributeorNone
- class wc_kb.eukaryote.RegDirectionAttribute(related_name='', verbose_name='', verbose_related_name='', description='')[source]¶
Bases:
obj_tables.ManyToManyAttributeRegulatory direction attribute
- serialize(directions, encoded=None)[source]¶
Serialize related object :param directions: a list of instances of TFdirection Python representation :type directions:
listofModel:param encoded: dictionary of objects that have already been encoded :type encoded:dict, optional- Returns:
simple Python representation
- Return type:
str
- deserialize(value, objects, decoded=None)[source]¶
Deserialize value :param value: String representation :type value:
str:param objects: dictionary of objects, grouped by model :type objects:dict:param decoded: dictionary of objects that have already been decoded :type decoded:dict, optional- Returns:
tupleof cleaned valueand cleaning error
- Return type:
tupleoflistofRegDirection,InvalidAttributeorNone
- class wc_kb.eukaryote.GeneLocus[source]¶
Bases:
wc_kb.core.PolymerLocusKnowledge of a gene
- Related attributes:
transcripts (
listofTranscriptSpeciesType): transcripts regulatory_modules (listof RegulatoryModule): regulatory_modules
- class wc_kb.eukaryote.TranscriptionFactorRegulation[source]¶
Bases:
obj_tables.ModelTranscription factor and the direction of transcriptional regulation
- Related attributes:
regulatory_modules (
listof RegulatoryModule): regulatory modules
- static _serialize(transcription_factor_id, direction_name)[source]¶
Generate string representation
- Parameters:
transcription_factor_id (
str) – transcription factor iddirection_name (
str) – regulatory direction name
- Returns:
value of primary attribute
- Return type:
str
- serialize()[source]¶
Generate string representation
- Returns:
value of primary attribute
- Return type:
str
- classmethod deserialize(value, objects)[source]¶
Deserialize value :param value: String representation :type value:
str:param objects: dictionary of objects, grouped by model :type objects:dict- Returns:
- tuple of cleaned value
and cleaning error
- Return type:
tupleof list of TranscriptionFactorRegulation, InvalidAttribute or None
- class wc_kb.eukaryote.RegulatoryModule[source]¶
Bases:
obj_tables.ModelKnowledge about regulatory modules
- class wc_kb.eukaryote.PtmSite[source]¶
Bases:
wc_kb.core.PolymerLocusKnowledge of protein modification sites
- class wc_kb.eukaryote.GenericLocus[source]¶
Bases:
obj_tables.ModelStart and end coordinates of exons and CDSs
- Related attributes:
transcripts (
listofTranscriptSpeciesType): transcripts proteins (listofProteinSpeciesType): proteins
- class wc_kb.eukaryote.TranscriptSpeciesType[source]¶
Bases:
wc_kb.core.PolymerSpeciesTypeKnowledge of a transcript (spliced RNA) species
- exons[source]¶
exon coordinates
- Type:
listofLocusAttribute
- Related attributes:
protein (
ProteinSpeciesType): protein
- get_empirical_formula(seq_input=None)[source]¶
Get the empirical formula for a transcript (spliced RNA) species with
5’ monophosphate
Deprotonated phosphate oxygens
\(N_A * AMP + N_C * CMP + N_G * GMP + N_U * UMP - (L-1) * OH\)
- Parameters:
seq_input (
Bio.Seq.Seq, optional) – if provided, the method will use it instead of reading from fasta file to reduce IO operation- Returns:
empirical formula
- Return type:
chem.EmpiricalFormula
- get_charge(seq_input=None)[source]¶
Get the charge for a transcript (spliced RNA) species with
5’ monophosphate
Deprotonated phosphate oxygens
\(-L - 1\)
- Parameters:
seq_input (
Bio.Seq.Seq, optional) – if provided, the method will use it instead of reading from fasta file to reduce IO operation- Returns:
charge
- Return type:
int
- get_mol_wt(seq_input=None)[source]¶
Get the molecular weight for a transcript (spliced RNA) species with
5’ monophosphate
Deprotonated phosphate oxygens
- Parameters:
seq_input (
Bio.Seq.Seq, optional) – if provided, the method will use it instead of reading from fasta file to reduce IO operation- Returns:
molecular weight (Da)
- Return type:
float
- class wc_kb.eukaryote.ProteinSpeciesType[source]¶
Bases:
wc_kb.core.PolymerSpeciesTypeKnowledge of a protein monomer
- coding_regions[source]¶
CDS coordinates
- Type:
listofLocusAttribute
- Related attributes:
transcription_factor_regulation (
listof TranscriptionFactorRegulation): transcription factor regulation ptm_sites (:obj:list` of PtmSite): protein modification sites
- get_seq(table=1, cds=True)[source]¶
Get the 5’ to 3’ sequence
- Parameters:
table (
int, optional) – NCBI identifier for translation table (default = standard table)cds (
bool, optional) – True indicates the sequence is a complete CDS
- Returns:
sequence
- Return type:
Bio.Seq.Seq
- get_seq_and_start_codon(table=1, cds=True)[source]¶
Get the 5’ to 3’ amino acid sequence and the start codon
- Parameters:
table (
int, optional) – NCBI identifier for translation table (default = standard table)cds (
bool, optional) – True indicates the sequence is a complete CDS
- Returns:
coding RNA sequence that will be translated
Bio.Seq.Seq: amino acid sequenceBio.Seq.Seq: start codon- Return type:
Bio.Seq.Seq
- get_empirical_formula(table=1, cds=True, seq_input=None)[source]¶
Get the empirical formula
- Parameters:
table (
int, optional) – NCBI identifier for translation table (default = standard table)cds (
bool, optional) – True indicates the sequence is a complete CDSseq_input (
Bio.Seq.Seq, optional) – if provided, the method will use it instead of reading from fasta file to reduce IO operation
- Returns:
empirical formula
- Return type:
chem.EmpiricalFormula
- get_charge(table=1, cds=True, seq_input=None)[source]¶
Get the charge at physiological pH
- Parameters:
table (
int, optional) – NCBI identifier for translation table (default = standard table)cds (
bool, optional) – True indicates the sequence is a complete CDSseq_input (
Bio.Seq.Seq, optional) – if provided, the method will use it instead of reading from fasta file to reduce IO operation
- Returns:
charge
- Return type:
int
- get_mol_wt(table=1, cds=True, seq_input=None)[source]¶
Get the molecular weight
- Parameters:
table (
int, optional) – NCBI identifier for translation table (default = standard table)cds (
bool, optional) – True indicates the sequence is a complete CDSseq_input (
Bio.Seq.Seq, optional) – if provided, the method will use it instead of reading from fasta file to reduce IO operation
- Returns:
molecular weight
- Return type:
float