Section: User Contributed Perl Documentation (3)
BTLib - Perl extension for a Biology Toolkit Library.
Object creation: new
Component access: seq seq (sequence) seqHead seqHead (fasta_header) seqFile seqFile (filename) killFile killFile (boolean) type type (DNA or protein)
Methods: filterSeq (command)
Internal methods: DESTROY seqToFile fileToSeq
BTLib offers an interface to apply various tools (like blast, the FDF
or the pftools) to analyze a protein or DNA
The basic concept is that a sequence to analyze is represented by anobject of type BTLib. You create this object using the method new().The newly created objects has all its fields set to undefined. Forexample:
$main::seq = BTLib->new;
The next step is to provide a sequence to the new object. This can bedone in two ways: either provide the name of a file containing a FASTAformatted sequence using the method seqFile(), or provide the sequenceheader and the sequence itself using the methods seqHead() and seq()respectively. So we have either:
The sequence can be filtered, using an arbitrary Unix command thatwrites its results to standard output, using the method filterSeq().This generates a new sequence object. Thus you can say:
my $filteredSeq = $main::seq->filterSeq(``xnu'');
If you no longer need the original sequence, you can also write:
$main::seq = $main::seq->filterSeq(``xnu'');
The object takes care (automagicaly) of creating a temporary FASTAfile containing the sequence, if needed. The file is deleted when theobject dies. When a file is supplied to the object, it will not bedeleted, unless you call the killFile() method with a non-zeroparameter.
Christian Iseli, LICR ITO
- SEE ALSO
This document was created byman2html,using the manual pages.