def __init__(self, start, phase=None, strand='+', pattern=None, pattern_offset=(0, 0), pssm_score=None, gff={}): """ Initialization function of Basal SpliceSite logic Recommended is to use only one of the inheriting classes @type start: number @param start: start coord of site (e.g GT) or pattern (e.g. tgtGTcgat) @type phase: number @param phase: [0,1,2] or None @type phase: number @param phase: [0,1,2] or None, default None @type strand: string @param strand: ['+','-'] or None, default '+' @type pattern: string @param pattern: splice site pattern sequence (e.g. tgtGTcgat) @type pattern_offset: tuple @param pattern_offset: tuple with 2 integers, specifying 5p and 3p offset towards actual splice site. e.g. (3,4) for tgtGTcgat @type pssm_score: float @param pssm_score: PSSM score of splice site pattern @type gff: dictionary @param gff: dictionary with gff data. Possible keys are: 'fref', 'fmethod', 'fstrand', 'fsource', 'gclass', 'gname' """ BasicGFF.__init__(self) self.start = start self.strand = strand self.phase = phase self.end = None # to be filled in inheriting classes self.pos = None # to be filled in inheriting classes self.canonical_donor = "GT" self.canonical_acceptor = "AG" # pattern, pattern_offset and pssm_score are only truely # functional in inheriting classes SpliceDonor and SpliceAcceptor self.pattern = pattern self.pssm_score = pssm_score self._offset_5p = pattern_offset[0] self._offset_3p = pattern_offset[1] # and some GFF data thingies self._gff['fscore'] = self.pssm_score self._gff.update(gff) # and error-check the data self.check()
def __init__(self,start,end,pattern="",gff={}): """ """ BasicGFF.__init__(self) self._gff.update(gff) self.start = start self.end = end self.pos = self.start self.pattern = pattern
def __init__(self, pos, gff={}): """ """ BasicGFF.__init__(self) self._gff.update(gff) self.pos = pos self.start = self.pos - 2 self.end = self.pos self.pssm_score = 1.0 # default, dummy value self.phase = None # no phase for this feature!
def __init__(self, acceptor, donor, gff={}): BasicGFF.__init__(self) self.donor = donor self.acceptor = acceptor # init by splice site objects self._init_by_splicesites() # update gff attributes self._gff.update(gff)
def __init__(self, pos, gff={}): """ """ BasicGFF.__init__(self) self._gff.update(gff) self.pos = pos self.start = self.pos self.end = self.start + 3 self.pssm_score = 1.0 # default, dummy value self.phase = 0
def __init__(self,pos,gff={}): """ """ BasicGFF.__init__(self) self._gff.update(gff) self.pos = pos self.start = self.pos self.end = self.start+3 self.pssm_score = 1.0 # default, dummy value self.phase = 0
def __init__(self,acceptor,donor,gff={}): BasicGFF.__init__(self) self.donor = donor self.acceptor = acceptor # init by splice site objects self._init_by_splicesites() # update gff attributes self._gff.update(gff)
def __init__(self,start,end,pattern="",gff={}): """ """ BasicGFF.__init__(self) self._gff.update(gff) self.start = start self.end = end self.pos = self.start self.pattern = pattern self.length = self.end - self.start if not self._gff.has_key('fscore'): self._gff['fscore'] = self.length
def __init__(self, start, end, pattern="", gff={}): """ """ BasicGFF.__init__(self) self._gff.update(gff) self.start = start self.end = end self.pos = self.start self.pattern = pattern self.length = self.end - self.start if not self._gff.has_key('fscore'): self._gff['fscore'] = self.length
def __init__(self,start,phase='.',strand='+',pattern=None, pattern_offset=(0,0),pssm_score=None,gff={}): """ Initialization function of Basal TranslationalStartSiteBase logic Recommended is to use only one of the inheriting classes @type start: number @param start: start coord of site (ATG) or pattern (e.g. nncancATGgcnnn) @type phase: number @param phase: [0,1,2] or None; only relevant when sequence ISA orf @type strand: string @param strand: ['+','-'] or None, default '+' @type pattern: string @param pattern: splice site pattern sequence (e.g. nncancATGgcnnn) @type pattern_offset: tuple @param pattern_offset: tuple with 2 integers, specifying 5p and 3p offset towards actual splice site. e.g. (0,0) for the base class (no PSSM) e.g. (6,5) for nncancATGgcnnn e.g. (9,7) for another implementation @type pssm_score: float @param pssm_score: PSSM score of splice site pattern @type gff: dictionary @param gff: dictionary with gff data. Possible keys are: 'fref', 'fmethod', 'fstrand', 'fsource', 'gclass', 'gname' """ # initialize basal BasicGff BasicGFF.__init__(self) self.start = start self.strand = strand self.phase = phase self.end = None # to be filled in inheriting classes self.pos = None # to be filled in inheriting classes self.tss = None # to be filled in inheriting classes self.canonical_tss = "ATG" # pattern, pattern_offset and pssm_score are only truely # functional in inheriting class TranslationalStartSite, # not in TranslationalStartSiteATG self.pattern = pattern self.pssm_score = pssm_score self._offset_5p = pattern_offset[0] self._offset_3p = pattern_offset[1] # update gff dict self._gff.update(gff) # and error-check the data IsProperPhase(self.phase) self.check()
def __init__(self,start,phase=None,strand='+',pattern=None, pattern_offset=(0,0),pssm_score=None,gff={}): """ Initialization function of Basal SpliceSite logic Recommended is to use only one of the inheriting classes @type start: number @param start: start coord of site (e.g GT) or pattern (e.g. tgtGTcgat) @type phase: number @param phase: [0,1,2] or None @type phase: number @param phase: [0,1,2] or None, default None @type strand: string @param strand: ['+','-'] or None, default '+' @type pattern: string @param pattern: splice site pattern sequence (e.g. tgtGTcgat) @type pattern_offset: tuple @param pattern_offset: tuple with 2 integers, specifying 5p and 3p offset towards actual splice site. e.g. (3,4) for tgtGTcgat @type pssm_score: float @param pssm_score: PSSM score of splice site pattern @type gff: dictionary @param gff: dictionary with gff data. Possible keys are: 'fref', 'fmethod', 'fstrand', 'fsource', 'gclass', 'gname' """ BasicGFF.__init__(self) self.start = start self.strand = strand self.phase = phase self.end = None # to be filled in inheriting classes self.pos = None # to be filled in inheriting classes self.canonical_donor = "GT" self.canonical_acceptor = "AG" # pattern, pattern_offset and pssm_score are only truely # functional in inheriting classes SpliceDonor and SpliceAcceptor self.pattern = pattern self.pssm_score = pssm_score self._offset_5p = pattern_offset[0] self._offset_3p = pattern_offset[1] # and some GFF data thingies self._gff['fscore'] = self.pssm_score self._gff.update(gff) # and error-check the data self.check()
def __init__(self, start, end, score, tss=None, intron=None, gff={}): """ @attention: when spliced by intron: a) provide Intron object b) provide end coordinate as if UNSPLICED (length*3nt) """ BasicGFF.__init__(self) self.start = start self.pos = self.start self.end = end self.length = self.end - self.start self.pssm_score = score self.tss = tss self.intron = intron self._gff.update(gff) if not self._gff.has_key('fmethod'): self._gff['fmethod'] = 'predSignalPeptide'
def __init__(self,start,end,score,tss=None,intron=None,gff={}): """ @attention: when spliced by intron: a) provide Intron object b) provide end coordinate as if UNSPLICED (length*3nt) """ BasicGFF.__init__(self) self.start = start self.pos = self.start self.end = end self.length = self.end - self.start self.pssm_score = score self.tss = tss self.intron = intron self._gff.update(gff) if not self._gff.has_key('fmethod'): self._gff['fmethod'] = 'predSignalPeptide'
def __init__(self,donor,acceptor,shared_nts,gff={}): # input validation IsDonor(donor) IsAcceptor(acceptor) # initialization BasicGFF.__init__(self) self._gff.update(gff) self.donor = donor self.acceptor = acceptor # init by splice site objects self._init_by_splicesites() # forward compatibility with IntronConnectingOrfs self.nt_from_stop_donor = None self.nt_from_stop_acceptor = None # set shared nt/aa data self.shared_nts = shared_nts self.shared_aa = "" if self.shared_nts: self.shared_aa = dna2prot.dna2protein(self.shared_nts)