Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
BM_Dataset Class Reference

Built-in Methods

 __init__ (self)
 Initialize an empty dataset.
 __len__ (self)
 Return the number of files recorded in the dataset.

Manipulating Data

 get_directory (self)
 Return the directory absolute path.
 load_from_directory (self, directory, file_name_re=".*", recursive=False)
 Add all file names in an input directory matching the input regular expression (default is all) with a possible recursive rule (default is False).
 remove_data (self, file_name_re=".*")
 Remove all the file names matching the regular expression (default is all).
 get_data (self, file_name_re=".*")
 Access to the list of stored file names matching the input regular expression (default is all).
 get_tuple_data (self, common_regex, regexs, general_regex=None)
 get_tuple_data
 _add_data (self, file_name)
 Add a file name to this dataset.
 _load_from_directory_recursive (self, directory, file_name_re, recursive)
 Add all file names in an input directory matching the input regular expression (default is all) with a possible recursive rule (default is False).

Detailed Description

Data structure representing a dataset, i.e a collection of files. The existence of each file added to the dataset is tested.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Initialize an empty dataset.

Member Function Documentation

◆ __len__()

__len__ ( self)

Return the number of files recorded in the dataset.

◆ _add_data()

_add_data ( self,
file_name )
protected

Add a file name to this dataset.

The file must exist.

◆ _load_from_directory_recursive()

_load_from_directory_recursive ( self,
directory,
file_name_re,
recursive )
protected

Add all file names in an input directory matching the input regular expression (default is all) with a possible recursive rule (default is False).

The directory must exist.

◆ get_data()

get_data ( self,
file_name_re = ".*" )

Access to the list of stored file names matching the input regular expression (default is all).

◆ get_directory()

get_directory ( self)

Return the directory absolute path.

◆ get_tuple_data()

get_tuple_data ( self,
common_regex,
regexs,
general_regex = None )

get_tuple_data

◆ load_from_directory()

load_from_directory ( self,
directory,
file_name_re = ".*",
recursive = False )

Add all file names in an input directory matching the input regular expression (default is all) with a possible recursive rule (default is False).

The directory must exist.

◆ remove_data()

remove_data ( self,
file_name_re = ".*" )

Remove all the file names matching the regular expression (default is all).