TSS_TTS_TU
- class GRATIOSA.TSS_TTS_TU.TSS(pos=None, strand=None, genes=[], score=None)
- Each TTS instance has to be initialized with the following attributes:
pos (int.): position of the TSS
strand (bool.): DNA strand (True for forward strand, False for complementary strand)
genes (list of str.): list of locus tags of genes associated with the TSS
score (float.): TSS score
- add_genes(tags, genes_dict)
add_genes completes the genes attribute of the TSS instance with the genes that are given as tags and that are in the genes_dict.
- Parameters:
tags (str.) – locus tags separated by commas
genes_dict – dictionary of shape {locus tag : Gene object}
Example
>>> from GRATIOSA import Genome >>> g = Genome.Genome("dickeya") >>> g.load_annotation() >>> from GRATIOSA.TSS_TTS_TU import TSS >>> tss = TSS() >>> tss.add_genes("Dda3937_00001,Dda3937_00002",g.genes)
- add_promoter(sig, *arg, **kwargs)
add_promoter completes the promoter attribute of the TSS instance. Creates or complete the ‘promoter’ of the TSS instance with the shape {[sig]:(sites)}
- Parameters:
sig (str.) – sigma factor
sites (Optional [str.]) – the left and right coordinates of the -10 and -35 elements with the shape “-10l,-10r,-35r,-35l”
genes_dict (Optional [dict.]) – dictionary of shape {locus tag : Gene object}
Example
>>> from GRATIOSA.TSS_TTS_TU import TSS >>> tss = TSS(pos=4707030,strand=False)
>>> tss.add_promoter(sig = "sigma70", sites="4707037,4707046,4707062,4707068") >>> tss.promoter {'sigma70': {'sites': (4707037, 4707046, 4707062, 4707068)}}
- add_prom_elements(gen_seq, gen_seqcompl, shift=0, prom=[0, 0])
add_prom_elements extracts sequences of the different promoter elements (spacer, -10, -35, discriminator, region around TSS) based on -35 and -10 coordinates that are included in the promoter attribute.
- Completes the ‘promoter’ attribute of the TSS instance:
Before using this method, this attribute was a dictionary of shape {sigma factor: subdictionary} containing, for each sigma factor, a subdictionary of shape “sites”:(-10l,-10r,-35r, -35l)} with -10l, -10r, -35r and -35l the left and right coordinates of the -10 and -35 elements. Now, this subdictionary contains 4 new keys : “spacer”, “minus10”,”minus35” and “discriminator”. Each associated value is the sequence of the element.
- Parameters:
gen_seq (str.) – sequence of the forward strand
gen_seqcompl (str.) – sequence of the complementary strand (WARNING: 3’ -> 5’)
shift (Optional [int.]) – number of nucleotides to include beyond each region on either side (Default: 0nt)
prom (Optional [int.,int.]) – region upstream and downstream TSS to extract. Argument with the shape: [length before TSS, length after TSS] Default: [0,0] ie no sequence will be extracted around TSS.
Note
If prom !=[0,0], self.promoter dictionary has also a new “region” key. self.promoter[‘region’] returns the sequence of the region chosen with the prom argument.
Warning
the promoter attribute has to be loaded prior using this method. Use add_promoter method.
Example
>>> from GRATIOSA import Genome >>> g = Genome.Genome("dickeya") >>> g.load_seq() >>> from GRATIOSA.TSS_TTS_TU import TSS >>> tss = TSS(pos=4707030,strand=False) >>> tss.add_promoter(sig = "sigma70", sites="4707037,4707046,4707062,4707068") >>> tss.add_prom_elements(g.seq, ... g.seqcompl, ... sig = "sigma70", ... sites="4707039,4707044,4707060,4707065", ... prom=[20,20]) >>> tss.promoter {'sigma70': {'sites': (4707037, 4707046, 4707062, 4707068), 'spacer': 'CCTCGCCCACCCTCA', 'minus10': 'ATCATCATGA', 'minus35': 'CCGTACC', 'discriminator': 'ATAACC'}, 'region': 'CTCAATCATCATGAATAACCCCCCTCCTTGTGTCTTTCTTA'}
- class GRATIOSA.TSS_TTS_TU.TTS(start=None, end=None, left=None, right=None, strand=None, rho_dpdt=None, genes=[], seq='', score=None)
- Each TTS instance has to be initialized with the following attributes:
left (int.) and right (int.): TTS coordinates (does not take into account the strand, ie right > left)
start (int.) and end (int.): positions of the beginning and the end of the TTS
strand (bool.): DNA strand (True for forward strand, False for complementary strand)
rho_dpdt (bool.): rho dependency of the TTS
genes (list of str.): list of locus tags of genes associated with the TTS
score (float.): TSS score
- add_genes(tags, genes_dict)
add_genes completes the genes attribute of the TTS instance with the genes that are given as tags and that are in the genes_dict.
- Parameters:
tags (str.) – locus tags separated by commas
genes_dict – dictionary of shape {locus tag : Gene object}
Example
>>> from GRATIOSA import Genome >>> g = Genome.Genome("dickeya") >>> g.load_annotation() >>> from GRATIOSA.TSS_TTS_TU import TTS >>> tts = TTS() >>> tts.add_genes("Dda3937_00001,Dda3937_00002",g.genes) >>> tts.genes ["Dda3937_00001,Dda3937_00002"]
- class GRATIOSA.TSS_TTS_TU.TU(start=None, end=None, left=None, right=None, strand=None, genes=[], expression=None, TSS=None, TTS=None)
- Each TU instance has to be initialized with the following attributes:
left (int.) and right (int.): TU coordinates (does not take into account the strand, ie right > left)
start (int.) and end (int.): positions of the beginning and the end of the TU
strand (bool.): DNA strand (True for forward strand, False for complementary strand)
genes (list of str.): list of locus tags of genes associated with the TU
- add_genes(tags, genes_dict)
add_genes completes the genes attribute of the TU instance with the genes that are given as tags and that are in the genes_dict.
- Parameters:
tags (str.) – locus tags separated by commas
genes_dict – dictionary of shape {locus tag : Gene object}
Example
>>> from GRATIOSA import Genome >>> g = Genome.Genome("dickeya") >>> g.load_annotation() >>> from GRATIOSA.TSS_TTS_TU import TU >>> tu = TU() >>> tu.add_genes("Dda3937_00001,Dda3937_00002",g.genes) >>> tu.genes ["Dda3937_00001,Dda3937_00002"]
- add_TU_expression(condition, TU_expr)
add_TU_expression adds an expression value associated to a new condition to the expression attribute of the TU instance. If a list of expressions is given in input (with the TU_expr argument), the mean is computed and the mean value is added to the attribute. Elif only one value is given in input, this value is directly added to the attribute.
Creates or completes the “expression” attribute of the TU instance. This attribute is a dictionary of shape {condition:expression value}
- Parameters:
condition (str.) – name of the condition
TU_expr (float or list of float) – expression value(s)
Example
>>> from GRATIOSA.TSS_TTS_TU import TU >>> tu = TU() >>> tu.add_TU_expression("Control",0.24) >>> tu.add_TU_expression("test",[0.2,0.4]) >>> tu.expression {'Control': 0.24, 'test': 0.30}
- add_TSS(TSS)
add_TSS attributes potential TSS to the TU object. Creates or completes the ‘TSS’ attributes (list of tuples) of the TU instance.
- Parameters:
TSS – tuple of shape (TSS position (int.), propotion of total starts (float))
Example
>>> from GRATIOSA.TSS_TTS_TU import TU >>> tu = TU() >>> tu.add_TU_expression("Control",0.24) >>> tu.add_TU_expression("test",[0.2,0.4]) >>> tu.expression {'Control': 0.24, 'test': 0.30}
- add_TTS(TTS)
add_TTS attributes potential TTS to the TU object. Creates or completes the ‘TTS’ attributes (list of tuples) of the TU instance.
- Parameters:
TTS – tuple of shape (TTS position (int.), propotion of total starts (float))