| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 19 | 2 | 2 | 0.988 | compound_stmt |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 19 | 1230 | Bio/Seq.py |
| 2 | 19 | 1251 | Bio/Seq.py |
| ||||
if hasattr(other,"alphabet"):
#other should be a Seq or a MutableSeq
if not Alphabet._check_type_compatible([self.alphabet,other.alphabet]):
raise TypeError("Incompatable alphabets %s and %s"%(repr(self.alphabet),repr(other.alphabet)))
#They should be the same sequence type (or one of them is generic)
a = Alphabet._consensus_alphabet([self.alphabet,other.alphabet])
if isinstance(other,MutableSeq):
#See test_GAQueens.py for an historic usage of a non-string
#alphabet! Adding the arrays should support this.
return self.__class__(self.data+other.data,a)
else:
return self.__class__(str(self)+str(other),a)
elif isinstance(other,basestring):
#other is a plain string - use the current alphabet
return self.__class__(str(self)+str(other),self.alphabet)
else:
raise TypeError
|
| ||||
if hasattr(other,"alphabet"):
#other should be a Seq or a MutableSeq
if not Alphabet._check_type_compatible([self.alphabet,other.alphabet]):
raise TypeError("Incompatable alphabets %s and %s"%(repr(self.alphabet),repr(other.alphabet)))
#They should be the same sequence type (or one of them is generic)
a = Alphabet._consensus_alphabet([self.alphabet,other.alphabet])
if isinstance(other,MutableSeq):
#See test_GAQueens.py for an historic usage of a non-string
#alphabet! Adding the arrays should support this.
return self.__class__(other.data+self.data,a)
else:
return self.__class__(str(other)+str(self),a)
elif isinstance(other,basestring):
#other is a plain string - use the current alphabet
return self.__class__(str(other)+str(self),self.alphabet)
else:
raise TypeError
|
| |||
if hasattr(other,"alphabet"):
#other should be a Seq or a MutableSeq
if not Alphabet._check_type_compatible([self.alphabet,other.alphabet]):
raise TypeError("Incompatable alphabets %s and %s"%(repr(self.alphabet),repr(other.alphabet)))
#They should be the same sequence type (or one of them is generic)
a = Alphabet._consensus_alphabet([self.alphabet,other.alphabet])
if isinstance(other,MutableSeq):
#See test_GAQueens.py for an historic usage of a non-string
#alphabet! Adding the arrays should support this.
return self.__class__( [[#variable71a77300]].data+ [[#variable77b31c00]].data,a)
else:
return self.__class__(str( [[#variable71a77300]])+str( [[#variable77b31c00]]),a)
elif isinstance(other,basestring):
#other is a plain string - use the current alphabet
return self.__class__(str( [[#variable71a77300]])+str( [[#variable77b31c00]]),self.alphabet)
else:
raise TypeError
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#71a77300]] | other |
| 1 | 2 | [[#71a77300]] | self |
| 2 | 1 | [[#77b31c00]] | self |
| 2 | 2 | [[#77b31c00]] | other |