NAME

Bio::AlignIO::stockholm - stockholm sequence input/output stream

SYNOPSIS

# Do not use this module directly.  Use it via the L<Bio::AlignIO> class.

use Bio::AlignIO;
use strict;

my $in = Bio::AlignIO->new(-format => 'stockholm',
                           -file   => 't/data/testaln.stockholm');
while( my $aln = $in->next_aln ) {

}

DESCRIPTION

This object can transform Bio::Align::AlignI objects to and from stockholm flat file databases. This has been completely refactored from the original stockholm parser to handle annotation data and now includes a write_aln() method for (almost) complete stockholm format output.

Stockholm alignment records normally contain additional sequence-based and alignment-based annotation

GF Lines (alignment feature/annotation):
#=GF <featurename> <Generic per-file annotation, free text>
Placed above the alignment

GC Lines (Alignment consensus)
#=GC <featurename> <Generic per-column annotation, exactly 1
     character per column>
Placed below the alignment

GS Lines (Sequence annotations)
#=GS <seqname> <featurename> <Generic per-sequence annotation, free
     text>

GR Lines (Sequence meta data)
#=GR <seqname> <featurename> <Generic per-sequence AND per-column
     mark up, exactly 1 character per column>

Currently, sequence annotations (those designated with GS tags) are parsed only for accession numbers and descriptions. It is intended that full parsing will be added at some point in the near future along with a builder option for optionally parsing alignment annotation and meta data.

The following methods/tags are currently used for storing and writing the alignment annotation data.

  Tag        SimpleAlign
               Method  
  ----------------------------------------------------------------------
   AC        accession  
   ID        id  
   DE        description
  ----------------------------------------------------------------------
  
  Tag        Bio::Annotation   TagName                    Parameters
             Class
  ----------------------------------------------------------------------
   AU        SimpleValue       record_authors             value
   SE        SimpleValue       seed_source                value
   GA        SimpleValue       gathering_threshold        value
   NC        SimpleValue       noise_cutoff               value
   TC        SimpleValue       trusted_cutoff             value
   TP        SimpleValue       entry_type                 value
   SQ        SimpleValue       num_sequences              value
   PI        SimpleValue       previous_ids               value
   DC        Comment           database_comment           comment
   CC        Comment           alignment_comment          comment
   DR        DBLink            aln_dblink                 database
                                                          primary_id
                                                          comment
   AM        SimpleValue       build_method               value
   NE        SimpleValue       pfam_family_accession      value
   NL        SimpleValue       sequence_start_stop        value
   SS        SimpleValue       sec_structure_source       value
   BM        SimpleValue       build_model                value
   RN        Reference         reference                  *
   RC        Reference         reference                  comment
   RM        Reference         reference                  pubmed
   RT        Reference         reference                  title
   RA        Reference         reference                  authors
   RL        Reference         reference                  location
  ----------------------------------------------------------------------
* RN is generated based on the number of Bio::Annotation::Reference objects

FEEDBACK

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:

http://bugzilla.open-bio.org/

AUTHORS - Chris Fields, Peter Schattner

Email: cjfields-at-uiuc-dot-edu, schattner@alum.mit.edu

CONTRIBUTORS

Andreas Kahari, ak-at-ebi.ac.uk Jason Stajich, jason-at-bioperl.org

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

next_aln

Title   : next_aln
Usage   : $aln = $stream->next_aln()
Function: returns the next alignment in the stream.
Returns : L<Bio::Align::AlignI> object
Args    : NONE

write_aln

Title   : write_aln
Usage   : $stream->write_aln(@aln)
Function: writes the $aln object into the stream in stockholm format
Returns : 1 for success and 0 for error
Args    : L<Bio::Align::AlignI> object