Package csb :: Package bio :: Package io :: Module isites :: Class ISitesParser
[frames] | no frames]

Class ISitesParser

source code

object --+
         |
        ISitesParser

Implements an I-Sites fragment library parser v.5.1+ (2008).

Instance Methods
 
__del__(self) source code
 
__enter__(self) source code
 
__exit__(self, exc_type, exc_value, traceback) source code
 
__init__(self, flatfile, express=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
Library
parse(self)
Parse I-sites library common/general properties.
source code
Cluster
parse_entry(self, entry)
Parse a single I-Sites entry.
source code
Library
parseall(self)
Parse the whole library to end.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  clusters
Efficient iterator over all Cluster objects.
  library
Return the general properties of the library.

Inherited from object: __class__

Method Details

__init__(self, flatfile, express=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • flatfile (str) - input *.isl I-Sites library file name
  • express (bool) - if True, speeds up the parser by ignoring the covariance tensors
Raises:
  • IOError - when the source file cannot be found
Overrides: object.__init__
(inherited documentation)

parse(self)

source code 

Parse I-sites library common/general properties. Clusters are not parsed, but can be fetched on demand while iterating over library.clusters.

Returns: Library
object representation of the library with a bound clusters generator

parse_entry(self, entry)

source code 

Parse a single I-Sites entry.

Returns: Cluster
object representation of the entry

parseall(self)

source code 

Parse the whole library to end.

Returns: Library
object representation of the library with all clusters pre-parsed

Property Details

clusters

Efficient iterator over all Cluster objects.

Get Method:
unreachable.clusters(self) - Efficient iterator over all Cluster objects.

library

Return the general properties of the library. Library Clusters are iterable, but read efficiently only on demand.

Get Method:
unreachable.library(self) - Return the general properties of the library.