CloneSet47


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29320.995stmt_list[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
129228
Bio/Prosite/__init__.py
229117
Bio/Prosite/Prodoc.py
329173
Bio/SwissProt/SProt.py
Clone Instance
1
Line Count
29
Source Line
228
Source File
Bio/Prosite/__init__.py

    __filename_key = "__filename" 

    def __init__(self,indexname,parser = None): 
         """__init__(self, indexname, parser=None)

        Open a Prosite Dictionary.  indexname is the name of the
        index for the dictionary.  The index should have been created
        using the index_file function.  parser is an optional Parser
        object to change the results into another form.  If set to None,
        then the raw contents of the file will be returned.

        """ 
         self._index = Index.Index(indexname) 
         self._handle = open(self._index[Dictionary.__filename_key]) 
         self._parser = parser 

    def __len__(self): 
         return len(self._index) 

    def __getitem__(self,key): 
        start,len =  self._index[key] 
        self._handle.seek(start) 
        data = self._handle.read(len) 
        if self._parser is not None: 
             return self._parser.parse(File.StringHandle(data)) 
        return data 

    def __getattr__(self,name): 
        return getattr(self._index,name) 


Clone Instance
2
Line Count
29
Source Line
117
Source File
Bio/Prosite/Prodoc.py

    __filename_key = "__filename" 

    def __init__(self,indexname,parser = None): 
         """__init__(self, indexname, parser=None)

        Open a Prodoc Dictionary.  indexname is the name of the
        index for the dictionary.  The index should have been created
        using the index_file function.  parser is an optional Parser
        object to change the results into another form.  If set to None,
        then the raw contents of the file will be returned.

        """ 
         self._index = Index.Index(indexname) 
         self._handle = open(self._index[Dictionary.__filename_key]) 
         self._parser = parser 

    def __len__(self): 
         return len(self._index) 

    def __getitem__(self,key): 
        start,len =  self._index[key] 
        self._handle.seek(start) 
        data = self._handle.read(len) 
        if self._parser is not None: 
             return self._parser.parse(File.StringHandle(data)) 
        return data 

    def __getattr__(self,name): 
        return getattr(self._index,name) 


Clone Instance
3
Line Count
29
Source Line
173
Source File
Bio/SwissProt/SProt.py

    __filename_key = "__filename" 

    def __init__(self,indexname,parser = None): 
         """__init__(self, indexname, parser=None)

        Open a SwissProt Dictionary.  indexname is the name of the
        index for the dictionary.  The index should have been created
        using the index_file function.  parser is an optional Parser
        object to change the results into another form.  If set to None,
        then the raw contents of the file will be returned.

        """ 
         self._index = Index.Index(indexname) 
         self._handle = open(self._index[self.__filename_key]) 
         self._parser = parser 

    def __len__(self): 
         return len(self._index) 

    def __getitem__(self,key): 
        start,len =  self._index[key] 
        self._handle.seek(start) 
        data = self._handle.read(len) 
        if self._parser is not None: 
             return self._parser.parse(File.StringHandle(data)) 
        return data 

    def __getattr__(self,name): 
        return getattr(self._index,name) 


Clone AbstractionParameter Count: 2Parameter Bindings

__filename_key = "__filename" 

def __init__(self,indexname,parser = None):
   [[#variable5fc109a0]]
  self._index = Index.Index(indexname) 
  self._handle = open(self._index[ [[#variable4f94e3a0]].__filename_key]) 
  self._parser = parser 

def __len__(self):
  return len(self._index) 

def __getitem__(self,key):
  start,len = self._index[key] 
  self._handle.seek(start) 
  data = self._handle.read(len) 
  if self._parser is not None:
  
    return self._parser.parse(File.StringHandle(data)) 
  return data 

def __getattr__(self,name):
  return getattr(self._index,name) 
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5fc109a0]]
"""__init__(self, indexname, parser=None)

        Open a Prodoc Dictionary.  indexname is the name of the
        index for the dictionary.  The index should have been created
        using the index_file function.  parser is an optional Parser
        object to change the results into another form.  If set to None,
        then the raw contents of the file will be returned.

        """ 
12[[#5fc109a0]]
"""__init__(self, indexname, parser=None)

        Open a Prosite Dictionary.  indexname is the name of the
        index for the dictionary.  The index should have been created
        using the index_file function.  parser is an optional Parser
        object to change the results into another form.  If set to None,
        then the raw contents of the file will be returned.

        """ 
13[[#5fc109a0]]
"""__init__(self, indexname, parser=None)

        Open a SwissProt Dictionary.  indexname is the name of the
        index for the dictionary.  The index should have been created
        using the index_file function.  parser is an optional Parser
        object to change the results into another form.  If set to None,
        then the raw contents of the file will be returned.

        """ 
21[[#4f94e3a0]]
Dictionary 
22[[#4f94e3a0]]
Dictionary 
23[[#4f94e3a0]]
self