Data Integrator (Perl API)
D-integrator API general design

Dint::Error is used as the base class for all exceptions using the Error module itself. Exceptions are caught based on type, not value.

Dint::Config reads the main configuration file "DataIntegrator.cfg" from the project root and handles the "current data version" concept.

Dint::ArgumentParser provides a common set of command-line switches that relate to the D-integrator, such as release and data version. Dint::ArgumentParser itself uses Dint::Config to handle the current version automatically.

Dint::Globals contains the project-wide constants and globals.

Dint::TableIO handles standard input and output in a common way between the different programs, providing input validation, consistent escaping and consistent handling of undefined values.

Dint::TableIO is usually used in combination with Dint::Init::Reader (unless a more sophisticated reader is required), which provides the standard, configurable input reader loop along with a Dint::Progress object.

Dint::EnsEMBL::Connector provides a "connector" to the EnsEMBL API. It allows the user to get an EnsEMBL::Adaptor object via Dint::EnsEMBL::Connector::get_adaptor() from the closest mirror and using the specified EnsEMBL API version, as defined in the configuration file in an automatic way.

Typically, all the above classes are never used directly. All command line tools make use of the global objects constructed through the Command-line initialization framework, which explains typical usage scenarios for each.

All other classes perform typically just one function which is related to the command being executed at hand, such as Dint::GCoords2Cons, Dint::GCoords2LD, etc. All these classes implement their core behavior (that is, the input/output function that is executed for each line from the reader loop) inside a method called convert().