CloneSet17


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
45340.966compound_stmt
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
145926
Bio/Restriction/Restriction.py
2451044
Bio/Restriction/Restriction.py
3451163
Bio/Restriction/Restriction.py
Clone Instance
1
Line Count
45
Source Line
926
Source File
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) 


Clone Instance
2
Line Count
45
Source Line
1044
Source File
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: ], 
        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) 


Clone Instance
3
Line Count
45
Source Line
1163
Source File
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) 


Clone AbstractionParameter Count: 4Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4fdcd7a0]]
fragments 
12[[#4fdcd7a0]]
length 
13[[#4fdcd7a0]]
fragments 
21[[#4fdcd720]]
[ ] 
22[[#4fdcd720]]
len(r)-1 
23[[#4fdcd720]]
[ ] 
31[[#4fdcd6c0]]
length 
32[[#4fdcd6c0]]
fragments 
33[[#4fdcd6c0]]
length 
41[[#4fdcd660]]
len(r)-1 
42[[#4fdcd660]]
[ ] 
43[[#4fdcd660]]
len(r)-1