| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 72 | 2 | 3 | 0.996 | stmt_list[8] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 72 | 1289 | Bio/Restriction/Restriction.py |
| 2 | 65 | 1424 | Bio/Restriction/Restriction.py |
| ||||
def _drop(self):
"""RE._drop() -> list.
for internal use only.
drop the site that are situated outside the sequence in linear sequence.
modify the index for site in circular sequences."""
#
# remove or modify the results that are outside the sequence.
# This is necessary since after finding the site we add the distance
# from the site to the cut with the _modify and _rev_modify methods.
# For linear we will remove these sites altogether.
# For circular sequence, we modify the result rather than _drop it
# since the site is in the sequence.
#
length = len(self.dna)
drop = itertools.dropwhile
take = itertools.takewhile
if self.dna.is_linear( ):
self.results = [x for x in drop( lambda x:x<1,self.results)]
self.results = [x for x in take( lambda x:x<length,self.results)]
else:
for index,location in enumerate(self.results):
if location<1:
self.results[index]+=length
else:
break
for index,location in enumerate(self.results[ : : -1]):
if location>length:
self.results[ -(index+1)]-=length
else:
break
return
_drop = classmethod(_drop)
def is_defined(self):
"""RE.is_defined() -> bool.
True if the sequence recognised and cut is constant,
i.e. the recognition site is not degenerated AND the enzyme cut inside
the site.
see also :
RE.is_ambiguous()
RE.is_unknown()"""
return True
is_defined = classmethod(is_defined)
def is_ambiguous(self):
"""RE.is_ambiguous() -> bool.
True if the sequence recognised and cut is ambiguous,
i.e. the recognition site is degenerated AND/OR the enzyme cut outside
the site.
see also :
RE.is_defined()
RE.is_unknown()"""
return False
is_ambiguous = classmethod(is_ambiguous)
def is_unknown(self):
"""RE.is_unknown() -> bool.
True if the sequence is unknown,
i.e. the recognition site has not been characterised yet.
see also :
RE.is_defined()
RE.is_ambiguous()"""
return False
is_unknown = classmethod(is_unknown)
|
| ||||
def _drop(self):
"""RE._drop() -> list.
for internal use only.
drop the site that are situated outside the sequence in linear sequence.
modify the index for site in circular sequences."""
length = len(self.dna)
drop = itertools.dropwhile
take = itertools.takewhile
if self.dna.is_linear( ):
self.results = [x for x in drop( lambda x:x<1,self.results)]
self.results = [x for x in take( lambda x:x<length,self.results)]
else:
for index,location in enumerate(self.results):
if location<1:
self.results[index]+=length
else:
break
for index,location in enumerate(self.results[ : : -1]):
if location>length:
self.results[ -(index+1)]-=length
else:
break
return
_drop = classmethod(_drop)
def is_defined(self):
"""RE.is_defined() -> bool.
True if the sequence recognised and cut is constant,
i.e. the recognition site is not degenerated AND the enzyme cut inside
the site.
see also :
RE.is_ambiguous()
RE.is_unknown()"""
return False
is_defined = classmethod(is_defined)
def is_ambiguous(self):
"""RE.is_ambiguous() -> bool.
True if the sequence recognised and cut is ambiguous,
i.e. the recognition site is degenerated AND/OR the enzyme cut outside
the site.
see also :
RE.is_defined()
RE.is_unknown()"""
return True
is_ambiguous = classmethod(is_ambiguous)
def is_unknown(self):
"""RE.is_unknown() -> bool.
True if the sequence is unknown,
i.e. the recognition site has not been characterised yet.
see also :
RE.is_defined()
RE.is_ambiguous()"""
return False
is_unknown = classmethod(is_unknown)
|
| |||
def _drop(self):
"""RE._drop() -> list.
for internal use only.
drop the site that are situated outside the sequence in linear sequence.
modify the index for site in circular sequences."""
#
# remove or modify the results that are outside the sequence.
# This is necessary since after finding the site we add the distance
# from the site to the cut with the _modify and _rev_modify methods.
# For linear we will remove these sites altogether.
# For circular sequence, we modify the result rather than _drop it
# since the site is in the sequence.
#
length = len(self.dna)
drop = itertools.dropwhile
take = itertools.takewhile
if self.dna.is_linear( ):
self.results = [x for x in drop( lambda x:x<1,self.results)]
self.results = [x for x in take( lambda x:x<length,self.results)]
else:
for index,location in enumerate(self.results):
if location<1:
self.results[index]+=length
else:
break
for index,location in enumerate(self.results[ : : -1]):
if location>length:
self.results[ -(index+1)]-=length
else:
break
return
_drop = classmethod(_drop)
def is_defined(self):
"""RE.is_defined() -> bool.
True if the sequence recognised and cut is constant,
i.e. the recognition site is not degenerated AND the enzyme cut inside
the site.
see also :
RE.is_ambiguous()
RE.is_unknown()"""
return [[#variable72f841c0]]
is_defined = classmethod(is_defined)
def is_ambiguous(self):
[[#variable2efe6900]]
return [[#variable3081e6e0]]
is_ambiguous = classmethod(is_ambiguous)
def is_unknown(self):
"""RE.is_unknown() -> bool.
True if the sequence is unknown,
i.e. the recognition site has not been characterised yet.
see also :
RE.is_defined()
RE.is_ambiguous()"""
return False
is_unknown = classmethod(is_unknown)
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#72f841c0]] | True |
| 1 | 2 | [[#72f841c0]] | False |
| 2 | 1 | [[#2efe6900]] | """RE.is_ambiguous() -> bool.
True if the sequence recognised and cut is ambiguous,
i.e. the recognition site is degenerated AND/OR the enzyme cut outside
the site.
see also :
RE.is_defined()
RE.is_unknown()""" |
| 2 | 2 | [[#2efe6900]] | """RE.is_ambiguous() -> bool.
True if the sequence recognised and cut is ambiguous,
i.e. the recognition site is degenerated AND/OR the enzyme cut outside
the site.
see also :
RE.is_defined()
RE.is_unknown()""" |
| 3 | 1 | [[#3081e6e0]] | False |
| 3 | 2 | [[#3081e6e0]] | True |