NAME

IndexDict

SYNOPSIS

    use IndexDict;
    
    my %dict = IndexDict->new(-file => $fasta_file, -type => $dict_type);

DESCRIPTION

IndexDict is a module to eat a file of FASTA-like entries and store them in a hash of key TURNIP index types and their values.

"dna" entries look like:

    >entryId
    ATCGATCGTACGATCGATCGTACGTACGTACGTACGTACGTACGAT

"qual" entries look like:

    >entryId
    43 41 53 23 12 12 12 12 23 24 52 52 52 52 52 43 46 46

"muscle" entries look like:

    >Template
    ATCGATCGTACGATCGATCGTACGTACGTACGTACGTACGTACGAT

CONSTRUCTORS

IndexDict->new()

    my %dna_dict = IndexDict->new(-file => "path/to/fasta/strain.fasta", -type => "dna");
    my %qual_dict = IndexDict->new(-file => "path/to/qual/strain.qual", -type => "qual");
    my %muscle_dict = IndexDict->new(-file => "path/to/muscle/strain.txt", -type => "muscle");

The new() class method constructs a new hash object. new() accepts the following parameters:

index dict file path A string representing the path to the fasta, qual or muscle index file
index type A string representing the type of dict to initialise, i.e. "dna", "qual" or "muscle"

FEEDBACK

Reporting Bugs

Please report bugs to the author.

AUTHOR

Rob Davey

init

 Title   : init
 Usage   : my %dict = IndexDict->new($index_file, $index_type);
 Function: parses an index file and stores the keys and values in a hash
 Returns : a hash representing the index file
 Args    : a file path and a string representing the index type to read ("dna", "qual", "muscle")