NAME
Bio::SeqIO::tinyseq - reading/writing sequences in NCBI TinySeq format
SYNOPSIS
Do not use this module directly; use the SeqIO handler system:
$stream = Bio::SeqIO->new( -file => $filename, -format => 'tinyseq' );while ( my $seq = $stream->next_seq ) {....}
DESCRIPTION
This object reads and writes Bio::Seq objects to and from TinySeq XML format. A TinySeq is a lightweight XML file of sequence information, analgous to FASTA format.
See <https://www.ncbi.nlm.nih.gov/dtd/NCBI_TSeq.mod.dtd> for the DTD.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
SEE ALSO
Bio::SeqIO, Bio::Seq.
AUTHOR
Donald Jackson, <[email protected]>
Parts of this module and the test script were patterned after Sheldon McKay's Bio::SeqIO::game. If it breaks, however, it's my fault not his ;).
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
next_seq
Title : next_seqUsage : $seq = $stream->next_seq()Function: returns the next sequence in the streamReturns : Bio::Seq objectArgs : NONE
write_seq
Title : write_seqUsage : $seq = $stream->write_seq(@sequence_objects); undef $streamFunction: outputs one or more sequence objects as TinySeq XMLReturns : 1 on successArgs : one or more sequence objects as TinySeq XML
Because the TSeq dtd includes closing tags after all sets are written, the output will not be complete until the program terminates or the object is forced out of scope (see close_writer()). May not perfectly reproduce TSeq_sid element for all sequences
_get_seqs
Title : _get_seqsUsage : Internal function - use next_seq() insteadFunction: parses the XML and creates Bio::Seq objectsReturns : 1 on successArgs : NONE
Currently stores all sequence objects into memory. I will work on do more of a stream-based approach
_get_species
Title : _get_speciesUsage : Internal functionFunction: gets a Bio::Species object from cache or creates as neededReturns : a Bio::Species object on success, undef on failureArgs : a classification string (eg 'Homo sapiens') anda NCBI taxon id (optional)
Objects are cached for parsing multiple sequence files.
_create_species
Title : _create_speciesUsage : Internal functionFunction: creates a Bio::Species objectReturns : a Bio::Species object on success, undef on failureArgs : a classification string (eg 'Homo sapiens') anda NCBI taxon id (optional)
_assign_identifier
Title : _assign_identifierUsage : Internal functionFunction: looks for sequence accessionReturns : 1 on successArgs : NONE
NCBI puts refseq accessions in TSeq_sid, others in TSeq_accver.
_convert_seqtype
Title : _convert_seqtypeUsage : Internal functionFunction: maps Bio::Seq::alphabet() values [dna/rna/protein] ontoTSeq_seqtype values [protein/nucleotide]
_get_idstring
Title : _get_idstringUsage : Internal functionFunction: parse accession and version info from TSeq_accveror TSeq_sid
_get_writer
Title : _get_writerUsage : Internal functionFunction: instantiate XML::Writer object if needed,output initial XML
close_writer
Title : close_writerUsage : $self->close_writer()Function: terminate XML outputArgs : NONEReturns : 1 on success
Called automatically by DESTROY when object goes out of scope