CloneSet39


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
72230.996stmt_list[8]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1721289
Bio/Restriction/Restriction.py
2651424
Bio/Restriction/Restriction.py
Clone Instance
1
Line Count
72
Source Line
1289
Source File
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) 


Clone Instance
2
Line Count
65
Source Line
1424
Source File
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.""" 
        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) 


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#72f841c0]]
True 
12[[#72f841c0]]
False 
21[[#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()""" 
22[[#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()""" 
31[[#3081e6e0]]
False 
32[[#3081e6e0]]
True