| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 45 | 3 | 4 | 0.966 | compound_stmt |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 45 | 926 | Bio/Restriction/Restriction.py |
| 2 | 45 | 1044 | Bio/Restriction/Restriction.py |
| 3 | 45 | 1163 | Bio/Restriction/Restriction.py |
| ||||
def catalyse(self,dna,linear = True):
"""RE.catalyse(dna, linear=True) -> tuple of DNA.
RE.catalyze(dna, linear=True) -> tuple of DNA.
return a tuple of dna as will be produced by using RE to restrict the
dna.
dna must be a Bio.Seq.Seq instance or a Bio.Seq.MutableSeq instance.
if linear is False, the sequence is considered to be circular and the
output will be modified accordingly."""
r = self.search(dna,linear)
d = self.dna
if not r: return d[1: ],
fragments = [ ]
length = len(r)-1
if d.is_linear( ):
#
# START of the sequence to FIRST site.
#
fragments.append(d[1:r[0]])
if length:
#
# if more than one site add them.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
#
# LAST site to END of the sequence.
#
fragments.append(d[r[ -1]: ])
else:
#
# circular : bridge LAST site to FIRST site.
#
fragments.append(d[r[ -1]: ]+d[1:r[0]])
if not length:
#
# one site we finish here.
#
return tuple(fragments)
#
# add the others.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
return tuple(fragments)
|
| ||||
def catalyse(self,dna,linear = True):
"""RE.catalyse(dna, linear=True) -> tuple of DNA.
RE.catalyze(dna, linear=True) -> tuple of DNA.
return a tuple of dna as will be produced by using RE to restrict the
dna.
dna must be a Bio.Seq.Seq instance or a Bio.Seq.MutableSeq instance.
if linear is False, the sequence is considered to be circular and the
output will be modified accordingly."""
r = self.search(dna,linear)
d = self.dna
if not r: return d[1: ],
length = len(r)-1
fragments = [ ]
if d.is_linear( ):
#
# START of the sequence to FIRST site.
#
fragments.append(d[1:r[0]])
if length:
#
# if more than one site add them.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
#
# LAST site to END of the sequence.
#
fragments.append(d[r[ -1]: ])
else:
#
# circular : bridge LAST site to FIRST site.
#
fragments.append(d[r[ -1]: ]+d[1:r[0]])
if not length:
#
# one site we finish here.
#
return tuple(fragments)
#
# add the others.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
return tuple(fragments)
|
| ||||
def catalyse(self,dna,linear = True):
"""RE.catalyse(dna, linear=True) -> tuple of DNA.
RE.catalyze(dna, linear=True) -> tuple of DNA.
return a tuple of dna as will be produced by using RE to restrict the
dna.
dna must be a Bio.Seq.Seq instance or a Bio.Seq.MutableSeq instance.
if linear is False, the sequence is considered to be circular and the
output will be modified accordingly."""
r = self.search(dna,linear)
d = self.dna
if not r: return d[1: ],
fragments = [ ]
length = len(r)-1
if d.is_linear( ):
#
# START of the sequence to FIRST site.
#
fragments.append(d[1:r[0]])
if length:
#
# if more than one site add them.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
#
# LAST site to END of the sequence.
#
fragments.append(d[r[ -1]: ])
else:
#
# circular : bridge LAST site to FIRST site.
#
fragments.append(d[r[ -1]: ]+d[1:r[0]])
if not length:
#
# one site we finish here.
#
return tuple(fragments)
#
# add the others.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
return tuple(fragments)
|
| |||
def catalyse(self,dna,linear = True):
"""RE.catalyse(dna, linear=True) -> tuple of DNA.
RE.catalyze(dna, linear=True) -> tuple of DNA.
return a tuple of dna as will be produced by using RE to restrict the
dna.
dna must be a Bio.Seq.Seq instance or a Bio.Seq.MutableSeq instance.
if linear is False, the sequence is considered to be circular and the
output will be modified accordingly."""
r = self.search(dna,linear)
d = self.dna
if not r: return d[1: ],
[[#variable4fdcd7a0]]= [[#variable4fdcd720]]
[[#variable4fdcd6c0]]= [[#variable4fdcd660]]
if d.is_linear( ):
#
# START of the sequence to FIRST site.
#
fragments.append(d[1:r[0]])
if length:
#
# if more than one site add them.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
#
# LAST site to END of the sequence.
#
fragments.append(d[r[ -1]: ])
else:
#
# circular : bridge LAST site to FIRST site.
#
fragments.append(d[r[ -1]: ]+d[1:r[0]])
if not length:
#
# one site we finish here.
#
return tuple(fragments)
#
# add the others.
#
fragments+=[d[r[x]:r[x+1]] for x in xrange(length)]
return tuple(fragments)
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4fdcd7a0]] | fragments |
| 1 | 2 | [[#4fdcd7a0]] | length |
| 1 | 3 | [[#4fdcd7a0]] | fragments |
| 2 | 1 | [[#4fdcd720]] | [ ] |
| 2 | 2 | [[#4fdcd720]] | len(r)-1 |
| 2 | 3 | [[#4fdcd720]] | [ ] |
| 3 | 1 | [[#4fdcd6c0]] | length |
| 3 | 2 | [[#4fdcd6c0]] | fragments |
| 3 | 3 | [[#4fdcd6c0]] | length |
| 4 | 1 | [[#4fdcd660]] | len(r)-1 |
| 4 | 2 | [[#4fdcd660]] | [ ] |
| 4 | 3 | [[#4fdcd660]] | len(r)-1 |