Package csb :: Package bio :: Package io :: Module wwpdb :: Class FileSystemStructureProvider
[frames] | no frames]

Class FileSystemStructureProvider

source code

       object --+    
                |    
StructureProvider --+
                    |
                   FileSystemStructureProvider

Simple file system based PDB data source. Scans a list of local directories using pre-defined file name templates.

Nested Classes

Inherited from StructureProvider: __metaclass__

Instance Methods
 
__init__(self, paths=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add(self, path)
Register a new local path.
source code
 
add_template(self, template)
Register a custom file name name template.
source code
str or None
find(self, id)
Attempt to discover a PDB file, given a specific PDB id.
source code
 
remove(self, path)
Unregister an existing local path.
source code

Inherited from StructureProvider: __getitem__, get

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

Class Variables
  __abstractmethods__ = frozenset([])
Properties
tuple paths
Current search paths
tuple templates
Current file name match templates

Inherited from object: __class__

Method Details

__init__(self, paths=None)
(Constructor)

source code 

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

Parameters:
  • paths (iterable or str) - a list of paths
Overrides: object.__init__
(inherited documentation)

add(self, path)

source code 

Register a new local path.

Parameters:
  • path (str) - directory name
Raises:
  • IOError - if path is not a valid directory

add_template(self, template)

source code 

Register a custom file name name template. The template must contain an {id} macro, e.g. pdb{id}.ent

Parameters:
  • template (str) - pattern

find(self, id)

source code 

Attempt to discover a PDB file, given a specific PDB id.

Parameters:
  • id - structure identifier (e.g. 1x80)
Returns: str or None
path and file name on success, None otherwise
Overrides: StructureProvider.find
(inherited documentation)

remove(self, path)

source code 

Unregister an existing local path.

Parameters:
  • path (str) - directory name
Raises:
  • ValueError - if path had not been registered

Property Details

paths

Current search paths

Get Method:
unreachable.paths(self) - Current search paths
Type:
tuple

templates

Current file name match templates

Get Method:
unreachable.templates(self) - Current file name match templates
Type:
tuple