def __init__(self, input=("", "", 0, 0), blastp_hsp=None, MATRIX=None, gff={}): """ """ PacbP.__init__(self, input=input, blastp_hsp=blastp_hsp, MATRIX=MATRIX, gff=gff)
def __init__(self, input=("", "", 0, 0), blastp_hsp=None, MATRIX={}, pacbp=None, input_dna=("", "", 0, 0)): """ """ # first, get to the point of an instantiated PacbP object if str(pacbp.__class__) in ['pacb.PacbP', 'pacb.pacbp.PacbP']: # loop over all attributes, and copy all true attributes # skip the `__`-starting attributes and the `instancemethods` for attr in dir(pacbp): if attr[0:2] == "__": continue if str(type(getattr(pacbp, attr))) != "<type 'instancemethod'>": # copy this attribute from PacbP to PacbPDNA setattr(self, attr, getattr(pacbp, attr)) # and move the original hsp object self._hsp = pacbp._hsp # check if a non-default matrix was applied if MATRIX: self.MATRIX = MATRIX else: # call the __init__ function of the basal PacbP class if MATRIX: PacbP.__init__(self, input=input, blastp_hsp=blastp_hsp, MATRIX=MATRIX) else: PacbP.__init__(self, input=input, blastp_hsp=blastp_hsp) # set the PacbPDNA specific attributes self.query_dna = "" self.query_dna_start = 0 self.query_dna_end = 0 self.query_dna_length = 0 self.sbjct_dna = "" self.sbjct_dna_start = 0 self.sbjct_dna_end = 0 self.sbjct_dna_length = 0 self._positions = [] # and finish initialization self._initialize(input_dna) self._alignment2positions() # set start and end positions of the original alignment # this is needed to calculate the `entropy` of a position # in the alignment self._original_alignment_pos_start = 0 self._original_alignment_pos_end = len(self._positions)
def __init__(self,input=("","",0,0),blastp_hsp=None,MATRIX={}, pacbp=None,input_dna=("","",0,0)): """ """ # first, get to the point of an instantiated PacbP object if str(pacbp.__class__) in ['pacb.PacbP','pacb.pacbp.PacbP']: # loop over all attributes, and copy all true attributes # skip the `__`-starting attributes and the `instancemethods` for attr in dir(pacbp): if attr[0:2] == "__": continue if str(type(getattr(pacbp,attr))) != "<type 'instancemethod'>": # copy this attribute from PacbP to PacbPDNA setattr(self,attr,getattr(pacbp,attr)) # and move the original hsp object self._hsp = pacbp._hsp # check if a non-default matrix was applied if MATRIX: self.MATRIX = MATRIX else: # call the __init__ function of the basal PacbP class if MATRIX: PacbP.__init__(self,input=input,blastp_hsp=blastp_hsp,MATRIX=MATRIX) else: PacbP.__init__(self,input=input,blastp_hsp=blastp_hsp) # set the PacbPDNA specific attributes self.query_dna = "" self.query_dna_start = 0 self.query_dna_end = 0 self.query_dna_length = 0 self.sbjct_dna = "" self.sbjct_dna_start = 0 self.sbjct_dna_end = 0 self.sbjct_dna_length = 0 self._positions = [] # and finish initialization self._initialize(input_dna) self._alignment2positions() # set start and end positions of the original alignment # this is needed to calculate the `entropy` of a position # in the alignment self._original_alignment_pos_start = 0 self._original_alignment_pos_end = len(self._positions)
def __init__(self,input=("","",0,0),blastp_hsp=None,MATRIX=None,gff={}): """ """ PacbP.__init__(self,input=input,blastp_hsp=blastp_hsp,MATRIX=MATRIX,gff=gff)