Bio::SeqIO::scf - .scf file input/output stream
Do not use this module directly. Use it via the Bio::SeqIO class, see Bio::SeqIO for more information.
This object can transform .scf files to and from Bio::Seq::SeqWithQuality objects. Mechanisms are present to retrieve trace data from scf files.
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion http://www.bioperl.org/MailList.shtml - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via email or the web:
bioperl-bugs@bio.perl.org http://bio.perl.org/bioperl-bugs/
Chad Matsalla bioinformatics@dieselwurks.com
Jason Stajich, jason@bioperl.org
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : next_seq() Usage : $scf = $stream->next_seq() Function: returns the next scf sequence in the stream Returns : Bio::Seq::SeqWithQuality object Args : NONE (huh?) Notes : Fills the interface specification for SeqIO. The SCF specification does not provide for having more then one sequence in a given scf. So once the filehandle has been open and passed to SeqIO don't expect to run this function more then once on a given scf unless you embraced and extended the SCF standard. (But that's just C R A Z Y talk, isn't it.)
Title : _next_scf() Usage : $scf = $stream->_next_scf() (but do not do this. use next_seq() instead.) Function: returns the next scf sequence in the stream Returns : Bio::Seq::SeqWithQuality object Args : NONE (huh?) Notes : An internal method. See next_seq for proper usage.
Title : _set_v3_quality() Usage : $self->_set_v3_quality() Function: Set the base qualities from version3 scf's Returns : Nothing. Alters $self. Args : None. Notes :
Title : _set_v3_peak_indices($buffer) Usage : $self->_set_v3_peak_indices($buffer); Function: Unpacks the base accuracies for version3 scf Returns : Nothing. Alters $self Args : A scalar containing binary data. Notes :
Title : _set_v3_base_accuracies($buffer) Usage : $self->_set_v3_base_accuracies($buffer) Function: Set the base accuracies for version 3 scf's Returns : Nothing. Alters $self. Args : A scalar containing binary data. Notes :
Title : _set_comments($buffer) Usage : $self->_set_comments($buffer); Function: Gather the comments section from the scf and parse it into its components. Returns : Nothing. Modifies $self. Args : The buffer. It is expected that the buffer contains a binary string for the comments section of an scf file according to the scf file specifications. Notes : None. Works like Jello.
Title : _set_header($buffer) Usage : $self->_set_header($buffer); Function: Gather the header section from the scf and parse it into its components. Returns : Nothing. Modifies $self. Args : The buffer. It is expected that the buffer contains a binary string for the header section of an scf file according to the scf file specifications. Notes : None.
Title : _set_v2_bases($buffer) Usage : $self->_set_v2_bases($buffer); Function: Gather the bases section from the scf and parse it into its components. Returns : Nothing. Modifies $self. Args : The buffer. It is expected that the buffer contains a binary string for the bases section of an scf file according to the scf file specifications. Notes : None.
Title : _initialize() Usage : Function: Bioperl initialize. Returns : Args : Notes :
Title : _set_v2_traces(\@traces_array) Usage : $self->_set_v2_traces(\@traces_array); Function: Parses an scf Version2 trace array into its base components. Returns : Nothing. Modifies $self. Args : A reference to an array of the unpacked traces section of an scf version2 file.
Title : get_trace($base_channel) Usage : @a_trace = @{$obj->get_trace("A")}; Function: Return the trace data for the given base. Returns : A reference to an array containing the trace data for the given base. Args : A,C,G, or T. Any other input throws. Notes :
Title : get_peak_indices() Usage : @a_trace = @{$obj->get_peak_indices()}; Function: Return the peak indices for this scf. Returns : A reference to an array containing the peak indices for this scf. Args : None. Notes :
Title : get_header() Usage : %header = %{$obj->get_header()}; Function: Return the header for this scf. Returns : A reference to a hash containing the header for this scf. Args : None. Notes :
Title : _dump_traces_incoming("transformed") Usage : &_dump_traces($ra,$rc,$rg,$rt); Function: Used in debugging. Prints all traces one beside each other. Returns : Nothing. Args : References to the arrays containing the traces for A,C,G,T. Notes : Beats using dumpValue, I'll tell ya. Much better then using join' ' too. - if a scalar is included as an argument (any scalar), this procedure will dump the _delta'd trace. If you don't know what that means you should not be using this.
Title : _dump_traces_outgoing("transformed") Usage : &_dump_traces_outgoing(($ra,$rc,$rg,$rt); Function: Used in debugging. Prints all traces one beside each other. Returns : Nothing. Args : References to the arrays containing the traces for A,C,G,T. Notes : Beats using dumpValue, I\'ll tell ya. Much better then using join' ' too. - if a scalar is included as an argument (any scalar), this procedur will dump the _delta'd trace. If you don't know what that means you should not be using this.
Title : write_seq(-SeqWithQuality => $swq, <comments>) Usage : $obj->write_seq( -SeqWithQuality => $swq, -version => 2, -CONV => "Bioperl-Chads Mighty SCF writer."); Function: Write out an scf. Returns : Nothing. Args : Requires: a reference to a SeqWithQuality object to form the basis for the scf. if -version is provided, it should be "2" or "3". A SCF of that version will be written. Any other arguments are assumed to be comments and are put into the comments section of the scf. Read the specifications for scf to decide what might be good to put in here. Notes : Someday: (All of this stuff is easy easy easy I just don't have the requirement or the time.) - Change the peak scaling factor? - Change the width of the peak? - Change the overlap between peaks?
Title : _set_binary_header(); Usage : $self->_set_binary_header(); Function: Provide the binary string that will be used as the header for a scfv2 document. Returns : A binary string. Args : None. Uses the entries in the $self->{'header'} hash. These are set on construction of the object (hopefully correctly!). Notes :
Title : _set_binary_tracesbases($version,$sequence,$ref_quality) Usage : $self->_set_binary_tracesbases($version,$sequence, $ref_quality); Function: Constructs the trace and base strings for all scfs Returns : Nothing. Alters self. Args : $version - "2" or "3" $sequence - a scalar containing arbitrary sequence data $ref_quality - a reference to an array containing quality values Notes : This is a really complicated thing.
Title : _make_trace_string($version) Usage : $self->_make_trace_string($version) Function: Merges trace data for the four bases to produce an scf trace string. _requires_ $version Returns : Nothing. Alters $self. Args : $version - a version number. "2" or "3" Notes :
Title : _set_binary_comments(\@comments) Usage : $self->_set_binary_comments(\@comments); Function: Provide a binary string that will be the comments section of the scf file. See the scf specifications for detailed specifications for the comments section of an scf file. Hint: CODE=something\nBODE=something\n\0 Returns : Nothing. Alters self. Args : A reference to an array containing comments. Notes : None.
Title : _fill_missing_data($swq) Usage : $self->_fill_missing_data($swq); Function: If the $swq with quality has no qualities, set all qualities to 0. If the $swq has no sequence, set the sequence to N's. Returns : Nothing. Modifies the SeqWithQuality that was passed as an argument. Args : A reference to a Bio::Seq::SeqWithQuality Notes : None.
Title : _delta(\@trace_data,$direction) Usage : $self->_delta(\@trace_data,$direction); Function: Returns : A reference to an array containing modified trace values. Args : A reference to an array containing trace data and a string indicating the direction of conversion. ("forward" or "backward"). Notes : This code is taken from the specification for SCF3.2. http://www.mrc-lmb.cam.ac.uk/pubseq/manual/formats_unix_4.html
Title : _unpack_magik($buffer) Usage : $self->_unpack_magik($buffer) Function: What unpack specification should be used? Try them all. Returns : Nothing. Args : A buffer containing arbitrary binary data. Notes : Eliminate the ambiguity and the guesswork. Used in the adaptation of _delta(), mostly.
Title : read_from_buffer($filehandle,$buffer,$length) Usage : $self->read_from_buffer($filehandle,$buffer,$length); Function: Read from the buffer. Returns : $buffer, containing a read of $length Args : a filehandle, a buffer, and a read length Notes : I just got tired of typing "unless (length($buffer) == $length)" so I put it here.
Title : _dump_keys() Usage : &_dump_keys($a_reference_to_some_hash) Function: Dump out the keys in a hash. Returns : Nothing. Args : A reference to a hash. Notes : A debugging method.
Title : _dump_base_accuracies() Usage : $self->_dump_base_accuracies(); Function: Dump out the v3 base accuracies in an easy to read format. Returns : Nothing. Args : None. Notes : A debugging method.
Title : _dump_peak_indices_incoming() Usage : $self->_dump_peak_indices_incoming(); Function: Dump out the v3 peak indices in an easy to read format. Returns : Nothing. Args : None. Notes : A debugging method.
Title : _dump_base_accuracies_incoming() Usage : $self->_dump_base_accuracies_incoming(); Function: Dump out the v3 base accuracies in an easy to read format. Returns : Nothing. Args : None. Notes : A debugging method.
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.