JPRED-2 Move Jpred 3.0.1 to public Git
[jpred.git] / jpred / lib / Index.pm
1 package Index;
2
3 use strict;
4 use warnings;
5 use Carp;
6
7 our @ISA;
8
9 =head1 NAME
10
11 Index.pm - Module for creating indexed databases and retrieving the sequences from them
12
13 =head1 SYNOPSIS
14
15   my $index = Index->new("Index::EMBOSS")
16
17 =head1 DESCRIPTION
18
19 This module provides an interface into retriving sequences from an indexed database, or given a database creates an index. First you have to choose what the type of index you want to use. Then there are a set of common functions for do these things.
20
21 =head1 EXAMPLE
22
23 First run:
24   my $index = Index->new("Index::EMBOSS")
25
26 Where Index::EMBOSS is a type of database/indexing system you want to use and there is a module available for. This makes a load of methods available which can be called. These are generic but should work on specific databases.
27
28 =head1 AVAILABLE METHODS
29
30 You should then be able to call various methods on the Index object.
31
32 =cut
33
34 sub new {
35         my ($class, %args) = @_;
36
37         my $type = $args{type};
38         eval "use $type";
39         push @ISA, $type;
40
41         my $self = {};
42         bless $self, ref($class) || $class;
43         return $self;
44 }
45
46 =head1 SEE ALSO
47
48 Look at the various perldoc pages for Index::*
49
50 =head1 AUTHOR
51
52 Jonathan Barber <jon@compbio.dundee.ac.uk>
53
54 =cut
55
56 1;