Browse files

This commit was manufactured by cvs2svn to create tag

'ontology-fix1'.

svn path=/bioperl-live/tags/ontology-fix1/; revision=5826
  • Loading branch information...
1 parent dccf25b commit 8fede469e931db017fc404f40f02be1bcefb57f8 nobody committed Mar 21, 2003
Showing with 0 additions and 19,802 deletions.
  1. +0 −134 AUTHORS
  2. +0 −78 BUGS
  3. +0 −824 Bio/Align/AlignI.pm
  4. +0 −683 Bio/Align/DNAStatistics.pm
  5. +0 −175 Bio/Align/PairwiseStatistics.pm
  6. +0 −109 Bio/Align/StatisticsI.pm
  7. +0 −161 Bio/Align/Utilities.pm
  8. +0 −505 Bio/AlignIO.pm
  9. +0 −204 Bio/AlignIO/bl2seq.pm
  10. +0 −281 Bio/AlignIO/clustalw.pm
  11. +0 −251 Bio/AlignIO/emboss.pm
  12. +0 −199 Bio/AlignIO/fasta.pm
  13. +0 −155 Bio/AlignIO/mase.pm
  14. +0 −229 Bio/AlignIO/mega.pm
  15. +0 −215 Bio/AlignIO/meme.pm
  16. +0 −242 Bio/AlignIO/msf.pm
  17. +0 −336 Bio/AlignIO/nexus.pm
  18. +0 −154 Bio/AlignIO/pfam.pm
  19. +0 −400 Bio/AlignIO/phylip.pm
  20. +0 −137 Bio/AlignIO/prodom.pm
  21. +0 −166 Bio/AlignIO/psi.pm
  22. +0 −169 Bio/AlignIO/selex.pm
  23. +0 −190 Bio/AlignIO/stockholm.pm
  24. +0 −828 Bio/AnalysisI.pm
  25. +0 −195 Bio/AnalysisParserI.pm
  26. +0 −229 Bio/AnalysisResultI.pm
  27. +0 −107 Bio/AnnotatableI.pm
  28. +0 −247 Bio/Annotation/AnnotationFactory.pm
  29. +0 −687 Bio/Annotation/Collection.pm
  30. +0 −176 Bio/Annotation/Comment.pm
  31. +0 −352 Bio/Annotation/DBLink.pm
  32. +0 −392 Bio/Annotation/OntologyTerm.pm
  33. +0 −477 Bio/Annotation/Reference.pm
  34. +0 −237 Bio/Annotation/SimpleValue.pm
  35. +0 −352 Bio/Annotation/StructuredValue.pm
  36. +0 −175 Bio/Annotation/TypeManager.pm
  37. +0 −177 Bio/AnnotationCollectionI.pm
  38. +0 −180 Bio/AnnotationI.pm
  39. +0 −2,091 Bio/Assembly/Contig.pm
  40. +0 −500 Bio/Assembly/ContigAnalysis.pm
  41. +0 −229 Bio/Assembly/IO.pm
  42. +0 −383 Bio/Assembly/IO/ace.pm
  43. +0 −313 Bio/Assembly/IO/phrap.pm
  44. +0 −615 Bio/Assembly/Scaffold.pm
  45. +0 −340 Bio/Assembly/ScaffoldI.pm
  46. +0 −372 Bio/Biblio.pm
  47. +0 −137 Bio/Biblio/Article.pm
  48. +0 −188 Bio/Biblio/BiblioBase.pm
  49. +0 −143 Bio/Biblio/Book.pm
  50. +0 −132 Bio/Biblio/BookArticle.pm
  51. +0 −373 Bio/Biblio/IO.pm
  52. +0 −542 Bio/Biblio/IO/medline2ref.pm
  53. +0 −744 Bio/Biblio/IO/medlinexml.pm
  54. +0 −144 Bio/Biblio/IO/pubmed2ref.pm
  55. +0 −309 Bio/Biblio/IO/pubmedxml.pm
  56. +0 −131 Bio/Biblio/Journal.pm
  57. +0 −138 Bio/Biblio/JournalArticle.pm
  58. +0 −205 Bio/Biblio/MedlineArticle.pm
  59. +0 −131 Bio/Biblio/MedlineBook.pm
  60. +0 −143 Bio/Biblio/MedlineBookArticle.pm
  61. +0 −137 Bio/Biblio/MedlineJournal.pm
  62. +0 −144 Bio/Biblio/MedlineJournalArticle.pm
  63. +0 −129 Bio/Biblio/Organisation.pm
  64. +0 −135 Bio/Biblio/Patent.pm
  65. +0 −146 Bio/Biblio/Person.pm
Sorry, we could not display the entire diff because too many files (1,097) changed.
View
134 AUTHORS
@@ -1,134 +0,0 @@
-=head1 PRIMARY AUTHORS AND MAJOR CONTRIBUTORS TO BIOPERL
-
-=head2 Releases co-ordinated and submitted by bioperl core devs.
-
-=over
-
-=item * Ewan Birney <birney at ebi.ac.uk>
-
-=item * Chris Dagdigian <dag at sonsorol.org>
-
-=item * Hilmar Lapp <hilmarl at yahoo.com>
-
-=item * Heikki Lehvaslaiho <heikki at ebi.ac.uk>
-
-=item * Jason Stajich <jason at bioperl.org>
-
-=item * Lincoln Stein <stein at cshl.org>
-
-=back
-
-=head2 Previous Bioperl Coordinators:
-
-=over
-
-=item * Steven Brenner <brenner at compbio.berkely.edu>
-
-=item * Georg Fuellen <fuellen at alum.mit.edu>
-
-=item * Steve Chervitz <sac at bioperl.org>
-
-=back
-
-=head2 Major Contributors
-
-(Feel free to add descriptions of which modules you are responsible
-for if you see fit)
-
-=over
-
-=item * Kris Boulez <kris.boulez at algonomics.com>
-
-=item * David Block <dblock at gnf.org>
-
-=item * Tim Bunce <Tim.Bunce at pobox.com> Code optimizations
-
-=item * Brad Chapman <chapmanb at arches.uga.edu>
-
-=item * Steve Chervitz <sac at bioperl.org>
-
-=item * Michele Clamp <michele at sanger.ac.uk>
-
-=item * Tony Cox <avc at sanger.ac.uk>
-
-=item * James Cuff <james at sanger.ac.uk>
-
-=item * Andrew Dalke <dalke at acm.org>
-
-=item * Allen Day <allenday at ucla.edu>
-
-=item * James Diggans <JDiggans at genelogic.com>
-
-=item * Arne Elofsson <arne at sbc.su.se>
-
-=item * Mark Fiers <M.W.E.J.Fiers at plant.wag-ur.nl>
-
-=item * Georg Fuellen <fullen at bioperl.org>
-
-=item * James Gilbert <jgrg at sanger.ac.uk>
-
-=item * Ed Green <ed at compbio.berkeley.edu>
-
-=item * Roger Hall <roger at iosea.com>
-
-=item * Ian Holmes <ihn at fruitfly.org>
-
-=item * Shawn Hoon <shawnh at fugu-sg.org>
-
-=item * Joseph Insana <insana at ebi.ac.uk> - Bio::LiveSeq
-
-=item * Nicolas Joly <njoly at pasteur.fr>
-
-=item * Ian Korf <ikorf at sapiens.wustl.edu>
-
-=item * Arek Kasprzyk <arek at ebi.ac.uk>
-
-=item * Catherine Letondal <letondal at pasteur.fr>
-
-=item * Aaron Mackey <amackey at virginia.edu>
-
-=item * Brad Marshall <bradmars at yahoo.com>
-
-=item * Chad Matsalla <bioinformatics1 at dieselwurks.com>
-
-=item * Chris Mungall <cjm at fruitfly.bdgp.berkeley.edu>
-
-=item * Brian Osborne <brian_osborne at cognia.com>
-
-=item * Jong Park
-
-=item * Matthew Pocock <matthew_pocock at yahoo.co.uk>
-
-=item * Lorenz Pollack <lorenz at ist.org> -- BPlite porting
-
-=item * Richard Resnick -- original Bio::Seq
-
-=item * Todd Richmond <todd at andrew2.stanford.edu>
-
-=item * Peter Schattner <schattner at alum.mit.edu>
-
-=item * Martin Senger <senger at ebi.ac.uk> -- Biblio
-
-=item * Allen Smith <allens at cpan.org> -- Bio::Matrix and Bio::SimpleAlign fixes
-
-=item * Arne Stabenau <stabenau at ebi.ac.uk>
-
-=item * Elia Stupka <elia at fugu-sg.org>
-
-=item * Gert Thijs <gert.thijs at esat.kuleuven.ac.be>
-
-=item * Charles Tilford <tilfordc at bms.com>
-
-=item * Paul-Christophe Varoutas
-
-=item * Andrew G. Walsh <paeruginosa at hotmail.com>
-
-=item * Kai Wang <tumorimmunology at yahoo.com>
-
-=item * Mark Wilkinson <mwilkinson at gene.pbi.nrc.ca>
-
-=item * Helge Weissig <helgew at sdsc.edu>
-
-=item * Alex Zelensky <alex_zelensky at mac.com> - Bioperl-DB
-
-=back
View
78 BUGS
@@ -1,78 +0,0 @@
-# $Id: BUGS,v 1.4 2002-12-31 13:09:05 birney Exp $
-
-Known Bugs
-
-Bioperl 1.2
-===========
-
- * The searchio.t test is failing on cygwin installations (and
- nowhere else). We need a developer who works with cygwin to
- help us out here. We suspect something to do with temporary file
- opening.
-
-
-Bioperl 0.9.0
-=============
- * Bio::Tools::Blast continues to cause problems for some people. As
- it is not actively maintained there are a slew of reported bugs for
- it that have not been fixed.
-
- * Bio::Tools::Run::Alignment::TCoffee - t_coffee binary does not get
- all parameters it needs when aligning (two) two DNA sequences
- (jitterbug #966).
-
- * Bio::Tools::Run::ClustalW and t/ClustalW will report errors for
- clustalw versions 1.8x due to a bug in clustalw.
-
- * Bio::DB::GenBank continues to have intermittent errors. Bio::DB::GDB
- is also unreliable at times and one can safely ignore errors from
- these during a make test.
- Bio::DB::GenBank is unable to download whole contig files as well
- as NCBI ref seqs like NT_* numbers unless the -format flag is
- passed in and specified as 'fasta' in the constructor.
- get_Stream_by_batch() also has intermittent errors which are being
- tracked down.
-
-Bioperl 0.7.2
-=============
-
- * NCBI has changed some of the cgi scripts for retrieving sequences
- online which as resulted in some of the DB methods from not working
- consistently. We are addressing these in the 0.9.x and 1.0 series
- of releases. We recommend using the Bio::DB::EMBL object that is
- part of the later releases.
-
- Additionally RefSeq Contigs are not properly downloaded, please see
- the bioperl list archives for information about potential
- workarounds and ongoing development effort to address these.
-
-Bioperl 0.7.1
-=============
- * Bio::Tools::BPlite does not parse and set frame properly for
- tblastx reports (Jitterbug bug # 978).
-
- * Bio::Tools::BPlite interface needs to be updated to fix parsing
- more than bl2seq report report (Jitterbug bug #940), this has been
- fixed on the main code trunk and will be part of the next major
- bioperl release.
-
- * If File::Temp is not installed, tempdirs are not cleaned up
- properly. This is fixed on main code trunk with the introduction
- of rmtree method in Bio::Root::IO, however, it is best to install
- File::Temp when running 0.7 branch code.
-
- * Bio::Tools::Blast does not allow users to run blast, instead use
- Bio::Tools::Run::StandAloneBlast to run local blasts. To submit
- jobs to a remote blast server like NCBI a module
- Bio::Tools::Run::RemoteBlast has been written but is part of the
- main trunk code and must be obtained through CVS until the next
- major bioperl release.
-
-Bioperl 0.7
-===========
- * Bio::Tools::BPlite doc error lists
- code synopsis code as
- my $parser = new BPlite(\*FH);
- should be
- my $parser = new Bio::Tools::BPlite(\*FH);
-
View
824 Bio/Align/AlignI.pm
@@ -1,824 +0,0 @@
-# $Id$
-#
-# BioPerl module for Bio::Align::AlignI
-#
-# Cared for by Jason Stajich <jason@bioperl.org>
-#
-# Copyright Jason Stajich
-#
-# You may distribute this module under the same terms as perl itself
-
-# POD documentation - main docs before the code
-
-=head1 NAME
-
-Bio::Align::AlignI - An interface for describing sequence alignments.
-
-=head1 SYNOPSIS
-
- # get a Bio::Align::AlignI somehow - typically using Bio::AlignIO system
- # some descriptors
- print $aln->length, "\n";
- print $aln->no_residues, "\n";
- print $aln->is_flush, "\n";
- print $aln->no_sequences, "\n";
- print $aln->percentage_identity, "\n";
- print $aln->consensus_string(50), "\n";
-
- # find the position in the alignment for a sequence location
- $pos = $aln->column_from_residue_number('1433_LYCES', 14); # = 6;
-
- # extract sequences and check values for the alignment column $pos
- foreach $seq ($aln->each_seq) {
- $res = $seq->subseq($pos, $pos);
- $count{$res}++;
- }
- foreach $res (keys %count) {
- printf "Res: %s Count: %2d\n", $res, $count{$res};
- }
-
-=head1 DESCRIPTION
-
-This interface describes the basis for alignment objects.
-
-=head1 FEEDBACK
-
-=head2 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.
-
- bioperl-l@bioperl.org - General discussion
- http://bioperl.org/MailList.shtml - About the mailing lists
-
-=head2 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
-email or the web:
-
- bioperl-bugs@bioperl.org
- http://bugzilla.bioperl.org/
-
-=head1 AUTHOR - Jason Stajich
-
-Email jason@bioperl.org
-
-=head1 CONTRIBUTORS
-
-Ewan Birney, birney@ebi.ac.uk
-Heikki Lehvaslaiho, heikki@ebi.ac.uk
-
-=head1 APPENDIX
-
-The rest of the documentation details each of the object methods.
-Internal methods are usually preceded with a _
-
-=cut
-
-
-# Let the code begin...
-
-
-package Bio::Align::AlignI;
-use vars qw(@ISA);
-use strict;
-
-use Bio::Root::RootI;
-
-@ISA = qw(Bio::Root::RootI);
-
-=head1 Modifier methods
-
-These methods modify the MSE by adding, removing or shuffling complete
-sequences.
-
-=head2 add_seq
-
- Title : add_seq
- Usage : $myalign->add_seq($newseq);
- Function : Adds another sequence to the alignment. *Does not* align
- it - just adds it to the hashes.
- Returns : nothing
- Argument : a Bio::LocatableSeq object
- order (optional)
-
-See L<Bio::LocatableSeq> for more information.
-
-=cut
-
-sub add_seq {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 remove_seq
-
- Title : remove_seq
- Usage : $aln->remove_seq($seq);
- Function : Removes a single sequence from an alignment
- Returns :
- Argument : a Bio::LocatableSeq object
-
-=cut
-
-sub remove_seq {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 purge
-
- Title : purge
- Usage : $aln->purge(0.7);
- Function:
-
- Removes sequences above whatever %id.
-
- This function will grind on large alignments. Beware!
- (perhaps not ideally implemented)
-
- Example :
- Returns : An array of the removed sequences
- Argument:
-
-
-=cut
-
-sub purge {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 sort_alphabetically
-
- Title : sort_alphabetically
- Usage : $ali->sort_alphabetically
- Function :
-
- Changes the order of the alignemnt to alphabetical on name
- followed by numerical by number.
-
- Returns :
- Argument :
-
-=cut
-
-sub sort_alphabetically {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head1 Sequence selection methods
-
-Methods returning one or more sequences objects.
-
-=head2 each_seq
-
- Title : each_seq
- Usage : foreach $seq ( $align->each_seq() )
- Function : Gets an array of Seq objects from the alignment
- Returns : an array
- Argument :
-
-=cut
-
-sub each_seq {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 each_alphabetically
-
- Title : each_alphabetically
- Usage : foreach $seq ( $ali->each_alphabetically() )
- Function :
-
- Returns an array of sequence object sorted alphabetically
- by name and then by start point.
- Does not change the order of the alignment
-
- Returns :
- Argument :
-
-=cut
-
-sub each_alphabetically {
- my($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 each_seq_with_id
-
- Title : each_seq_with_id
- Usage : foreach $seq ( $align->each_seq_with_id() )
- Function :
-
- Gets an array of Seq objects from the
- alignment, the contents being those sequences
- with the given name (there may be more than one)
-
- Returns : an array
- Argument : a seq name
-
-=cut
-
-sub each_seq_with_id {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 get_seq_by_pos
-
- Title : get_seq_by_pos
- Usage : $seq = $aln->get_seq_by_pos(3) # third sequence from the alignment
- Function :
-
- Gets a sequence based on its position in the alignment.
- Numbering starts from 1. Sequence positions larger than
- no_sequences() will thow an error.
-
- Returns : a Bio::LocatableSeq object
- Argument : positive integer for the sequence osition
-
-=cut
-
-sub get_seq_by_pos {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head1 Create new alignments
-
-The result of these methods are horizontal or vertical subsets of the
-current MSE.
-
-=head2 select
-
- Title : select
- Usage : $aln2 = $aln->select(1, 3) # three first sequences
- Function :
-
- Creates a new alignment from a continuous subset of
- sequences. Numbering starts from 1. Sequence positions
- larger than no_sequences() will thow an error.
-
- Returns : a Bio::SimpleAlign object
- Argument : positive integer for the first sequence
- positive integer for the last sequence to include (optional)
-
-=cut
-
-sub select {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-
-=head2 select_noncont
-
- Title : select_noncont
- Usage : $aln2 = $aln->select_noncont(1, 3) # first and 3rd sequences
- Function :
-
- Creates a new alignment from a subset of
- sequences. Numbering starts from 1. Sequence positions
- larger than no_sequences() will thow an error.
-
- Returns : a Bio::SimpleAlign object
- Args : array of integers for the sequences
-
-=cut
-
-sub select_noncont {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 slice
-
- Title : slice
- Usage : $aln2 = $aln->slice(20, 30)
- Function :
-
- Creates a slice from the alignment inclusive of start and
- end columns. Sequences with no residues in the slice are
- excluded from the new alignment and a warning is printed.
- Slice beyond the length of the sequence does not do
- padding.
-
- Returns : a Bio::SimpleAlign object
- Argument : positive integer for start column
- positive integer for end column
-
-=cut
-
-sub slice {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head1 Change sequences within the MSE
-
-These methods affect characters in all sequences without changeing the
-alignment.
-
-
-=head2 map_chars
-
- Title : map_chars
- Usage : $ali->map_chars('\.','-')
- Function :
-
- Does a s/$arg1/$arg2/ on the sequences. Useful for gap
- characters
-
- Notice that the from (arg1) is interpretted as a regex,
- so be careful about quoting meta characters (eg
- $ali->map_chars('.','-') wont do what you want)
-
- Returns :
- Argument : 'from' rexexp
- 'to' string
-
-=cut
-
-sub map_chars {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 uppercase
-
- Title : uppercase()
- Usage : $ali->uppercase()
- Function : Sets all the sequences to uppercase
- Returns :
- Argument :
-
-=cut
-
-sub uppercase {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 match_line
-
- Title : match_line()
- Usage : $align->match_line()
- Function : Generates a match line - much like consensus string
- except that a line indicating the '*' for a match.
- Argument : (optional) Match line characters ('*' by default)
- (optional) Strong match char (':' by default)
- (optional) Weak match char ('.' by default)
-
-=cut
-
-sub match_line {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 match
-
- Title : match()
- Usage : $ali->match()
- Function :
-
- Goes through all columns and changes residues that are
- identical to residue in first sequence to match '.'
- character. Sets match_char.
-
- USE WITH CARE: Most MSE formats do not support match
- characters in sequences, so this is mostly for output
- only. NEXUS format (Bio::AlignIO::nexus) can handle
- it.
-
- Returns : 1
- Argument : a match character, optional, defaults to '.'
-
-=cut
-
-sub match {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 unmatch
-
- Title : unmatch()
- Usage : $ali->unmatch()
- Function :
-
- Undoes the effect of method match. Unsets match_char.
-
- Returns : 1
- Argument : a match character, optional, defaults to '.'
-
-=cut
-
-sub unmatch {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-
-=head1 MSE attibutes
-
-Methods for setting and reading the MSE attributes.
-
-Note that the methods defining character semantics depend on the user
-to set them sensibly. They are needed only by certain input/output
-methods. Unset them by setting to an empty string ('').
-
-=head2 id
-
- Title : id
- Usage : $myalign->id("Ig")
- Function : Gets/sets the id field of the alignment
- Returns : An id string
- Argument : An id string (optional)
-
-=cut
-
-sub id {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 missing_char
-
- Title : missing_char
- Usage : $myalign->missing_char("?")
- Function : Gets/sets the missing_char attribute of the alignment
- It is generally recommended to set it to 'n' or 'N'
- for nucleotides and to 'X' for protein.
- Returns : An missing_char string,
- Argument : An missing_char string (optional)
-
-=cut
-
-sub missing_char {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 match_char
-
- Title : match_char
- Usage : $myalign->match_char('.')
- Function : Gets/sets the match_char attribute of the alignment
- Returns : An match_char string,
- Argument : An match_char string (optional)
-
-=cut
-
-sub match_char {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 gap_char
-
- Title : gap_char
- Usage : $myalign->gap_char('-')
- Function : Gets/sets the gap_char attribute of the alignment
- Returns : An gap_char string, defaults to '-'
- Argument : An gap_char string (optional)
-
-=cut
-
-sub gap_char {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 symbol_chars
-
- Title : symbol_chars
- Usage : my @symbolchars = $aln->symbol_chars;
- Function: Returns all the seen symbols (other than gaps)
- Returns : array of characters that are the seen symbols
- Argument: boolean to include the gap/missing/match characters
-
-=cut
-
-sub symbol_chars{
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head1 Alignment descriptors
-
-These read only methods describe the MSE in various ways.
-
-
-=head2 consensus_string
-
- Title : consensus_string
- Usage : $str = $ali->consensus_string($threshold_percent)
- Function : Makes a strict consensus
- Returns :
- Argument : Optional treshold ranging from 0 to 100.
- The consensus residue has to appear at least threshold %
- of the sequences at a given location, otherwise a '?'
- character will be placed at that location.
- (Default value = 0%)
-
-=cut
-
-sub consensus_string {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 consensus_iupac
-
- Title : consensus_iupac
- Usage : $str = $ali->consensus_iupac()
- Function :
-
- Makes a consensus using IUPAC ambiguity codes from DNA
- and RNA. The output is in upper case except when gaps in
- a column force output to be in lower case.
-
- Note that if your alignment sequences contain a lot of
- IUPAC ambiquity codes you often have to manually set
- alphabet. Bio::PrimarySeq::_guess_type thinks they
- indicate a protein sequence.
-
- Returns : consensus string
- Argument : none
- Throws : on protein sequences
-
-
-=cut
-
-sub consensus_iupac {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 is_flush
-
- Title : is_flush
- Usage : if( $ali->is_flush() )
- :
- :
- Function : Tells you whether the alignment
- : is flush, ie all of the same length
- :
- :
- Returns : 1 or 0
- Argument :
-
-=cut
-
-sub is_flush {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 length
-
- Title : length()
- Usage : $len = $ali->length()
- Function : Returns the maximum length of the alignment.
- To be sure the alignment is a block, use is_flush
- Returns :
- Argument :
-
-=cut
-
-sub length {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 maxdisplayname_length
-
- Title : maxdisplayname_length
- Usage : $ali->maxdisplayname_length()
- Function :
-
- Gets the maximum length of the displayname in the
- alignment. Used in writing out various MSE formats.
-
- Returns : integer
- Argument :
-
-=cut
-
-sub maxname_length {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 no_residues
-
- Title : no_residues
- Usage : $no = $ali->no_residues
- Function : number of residues in total in the alignment
- Returns : integer
- Argument :
-
-=cut
-
-sub no_residues {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 no_sequences
-
- Title : no_sequences
- Usage : $depth = $ali->no_sequences
- Function : number of sequence in the sequence alignment
- Returns : integer
- Argument : None
-
-=cut
-
-sub no_sequences {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 percentage_identity
-
- Title : percentage_identity
- Usage : $id = $align->percentage_identity
- Function: The function calculates the percentage identity of the alignment
- Returns : The percentage identity of the alignment (as defined by the
- implementation)
- Argument: None
-
-=cut
-
-sub percentage_identity{
- my ($self) = @_;
- $self->throw_not_implemeneted();
-}
-
-=head2 overall_percentage_identity
-
- Title : percentage_identity
- Usage : $id = $align->percentage_identity
- Function: The function calculates the percentage identity of
- the conserved columns
- Returns : The percentage identity of the conserved columns
- Args : None
-
-=cut
-
-sub overall_percentage_identity{
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-
-=head2 average_percentage_identity
-
- Title : average_percentage_identity
- Usage : $id = $align->average_percentage_identity
- Function: The function uses a fast method to calculate the average
- percentage identity of the alignment
- Returns : The average percentage identity of the alignment
- Args : None
-
-=cut
-
-sub average_percentage_identity{
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head1 Alignment positions
-
-Methods to map a sequence position into an alignment column and back.
-column_from_residue_number() does the former. The latter is really a
-property of the sequence object and can done using
-L<Bio::LocatableSeq::location_from_column>:
-
- # select somehow a sequence from the alignment, e.g.
- my $seq = $aln->get_seq_by_pos(1);
- #$loc is undef or Bio::LocationI object
- my $loc = $seq->location_from_column(5);
-
-
-=head2 column_from_residue_number
-
- Title : column_from_residue_number
- Usage : $col = $ali->column_from_residue_number( $seqname, $resnumber)
- Function:
-
- This function gives the position in the alignment
- (i.e. column number) of the given residue number in the
- sequence with the given name. For example, for the
- alignment
-
- Seq1/91-97 AC..DEF.GH
- Seq2/24-30 ACGG.RTY..
- Seq3/43-51 AC.DDEFGHI
-
- column_from_residue_number( "Seq1", 94 ) returns 5.
- column_from_residue_number( "Seq2", 25 ) returns 2.
- column_from_residue_number( "Seq3", 50 ) returns 9.
-
- An exception is thrown if the residue number would lie
- outside the length of the aligment
- (e.g. column_from_residue_number( "Seq2", 22 )
-
- Note: If the the parent sequence is represented by more than
- one alignment sequence and the residue number is present in
- them, this method finds only the first one.
-
- Returns : A column number for the position in the alignment of the
- given residue in the given sequence (1 = first column)
- Args : A sequence id/name (not a name/start-end)
- A residue number in the whole sequence (not just that
- segment of it in the alignment)
-
-=cut
-
-sub column_from_residue_number {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head1 Sequence names
-
-Methods to manipulate the display name. The default name based on the
-sequence id and subsequence positions can be overridden in various
-ways.
-
-=head2 displayname
-
- Title : displayname
- Usage : $myalign->displayname("Ig", "IgA")
- Function : Gets/sets the display name of a sequence in the alignment
- :
- Returns : A display name string
- Argument : name of the sequence
- displayname of the sequence (optional)
-
-=cut
-
-sub displayname {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 set_displayname_count
-
- Title : set_displayname_count
- Usage : $ali->set_displayname_count
- Function :
-
- Sets the names to be name_# where # is the number of
- times this name has been used.
-
- Returns : None
- Argument : None
-
-=cut
-
-sub set_displayname_count {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 set_displayname_flat
-
- Title : set_displayname_flat
- Usage : $ali->set_displayname_flat()
- Function : Makes all the sequences be displayed as just their name,
- not name/start-end
- Returns : 1
- Argument : None
-
-=cut
-
-sub set_displayname_flat {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 set_displayname_normal
-
- Title : set_displayname_normal
- Usage : $ali->set_displayname_normal()
- Function : Makes all the sequences be displayed as name/start-end
- Returns : None
- Argument : None
-
-=cut
-
-sub set_displayname_normal {
- my ($self) = @_;
- $self->throw_not_implemented();
-}
-
-1;
View
683 Bio/Align/DNAStatistics.pm
@@ -1,683 +0,0 @@
-# $Id$
-#
-# BioPerl module for Bio::Align::DNAStatistics
-#
-# Cared for by Jason Stajich <jason@bioperl.org>
-#
-# Copyright Jason Stajich
-#
-# You may distribute this module under the same terms as perl itself
-
-# POD documentation - main docs before the code
-
-=head1 NAME
-
-Bio::Align::DNAStatistics - Calculate some statistics for a DNA alignment
-
-=head1 SYNOPSIS
-
- use Bio::Align::DNAStatistics;
- use Bio::AlignIO;
-
- my $stats = new Bio::Align::PairwiseStatistics;
- my $alignin = new Bio::AlignIO(-format => 'emboss',
- -file => 't/data/insulin.water');
- my $jc = $stats->distance($aln, 'Jukes-Cantor');
- foreach my $r ( @$jc ) {
- print "\t";
- foreach my $r ( @$d ) {
- print "$r\t";
- }
- print "\n";
- }
-
-=head1 DESCRIPTION
-
-This object contains routines for calculating various statistics and
-distances for DNA alignments. The routines are not well tested and do
-contain errors at this point. Work is underway to correct them, but
-do not expect this code to give you the right answer currently! Use
-dnadist/distmat in the PHLYIP or EMBOSS packages to calculate the
-distances.
-
-=head1 FEEDBACK
-
-=head2 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.
-
- bioperl-l@bioperl.org - General discussion
- http://bioperl.org/MailList.shtml - About the mailing lists
-
-=head2 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
-email or the web:
-
- bioperl-bugs@bioperl.org
- http://bugzilla.bioperl.org/
-
-=head1 AUTHOR - Jason Stajich
-
-Email jason@bioperl.org
-
-Describe contact details here
-
-=head1 CONTRIBUTORS
-
-Additional contributors names and emails here
-
-=head1 APPENDIX
-
-The rest of the documentation details each of the object methods.
-Internal methods are usually preceded with a _
-
-=cut
-
-
-# Let the code begin...
-
-
-package Bio::Align::DNAStatistics;
-use vars qw(@ISA %DNAChanges @Nucleotides %NucleotideIndexes
- $GapChars $SeqCount $DefaultGapPenalty %DistanceMethods);
-use strict;
-use Bio::Align::PairwiseStatistics;
-use Bio::Root::Root;
-
-BEGIN {
- $GapChars = '(\.|\-)';
- @Nucleotides = qw(A G T C);
- $SeqCount = 2;
- # these values come from EMBOSS distmat implementation
- %NucleotideIndexes = ( 'A' => 0,
- 'T' => 1,
- 'C' => 2,
- 'G' => 3,
-
- 'AT' => 0,
- 'AC' => 1,
- 'AG' => 2,
- 'CT' => 3,
- 'GT' => 4,
- 'CG' => 5,
-
-# these are wrong now
-# 'S' => [ 1, 3],
-# 'W' => [ 0, 4],
-# 'Y' => [ 2, 3],
-# 'R' => [ 0, 1],
-# 'M' => [ 0, 3],
-# 'K' => [ 1, 2],
-# 'B' => [ 1, 2, 3],
-# 'H' => [ 0, 2, 3],
-# 'V' => [ 0, 1, 3],
-# 'D' => [ 0, 1, 2],
- );
-
- $DefaultGapPenalty = 0;
- # could put ambiguities here?
- %DNAChanges = ( 'Transversions' => { 'A' => [ 'T', 'C'],
- 'T' => [ 'A', 'G'],
- 'C' => [ 'A', 'G'],
- 'G' => [ 'C', 'T'],
- },
- 'Transitions' => { 'A' => [ 'G' ],
- 'G' => [ 'A' ],
- 'C' => [ 'T' ],
- 'T' => [ 'C' ],
- },
- );
- %DistanceMethods = ( 'jc|jukes|jukes-cantor' => 'JukesCantor',
- 'f81' => 'F81',
- 'k2|k2p|k80|kimura' => 'Kimura',
- 't92|tamura|tamura92' => 'Tamura',
- 'f84' => 'F84',
- 'tajimanei|tajima-nei' => 'TajimaNei' );
-}
-
-@ISA = qw( Bio::Root::Root Bio::Align::StatisticsI );
-
-=head2 new
-
- Title : new
- Usage : my $obj = new Bio::Align::DNAStatistics();
- Function: Builds a new Bio::Align::DNAStatistics object
- Returns : Bio::Align::DNAStatistics
- Args : none
-
-
-=cut
-
-sub new {
- my ($class,@args) = @_;
- my $self = $class->SUPER::new(@args);
-
- $self->pairwise_stats( new Bio::Align::PairwiseStatistics());
-
- return $self;
-}
-
-
-=head2 distance
-
- Title : distance
- Usage : my $distance_mat = $stats->distance(-align => $aln,
- -method => $method);
- Function: Calculates a distance matrix for all pairwise distances of
- sequences in an alignment.
- Returns : Array ref
- Args : -align => Bio::Align::AlignI object
- -method => String specifying specific distance method
- (implementing class may assume a default)
-
-=cut
-
-sub distance{
- my ($self,@args) = @_;
- my ($aln,$method) = $self->_rearrange([qw(ALIGN METHOD)],@args);
- if( ! defined $aln || ! ref ($aln) || ! $aln->isa('Bio::Align::AlignI') ) {
- $self->throw("Must supply a valid Bio::Align::AlignI for the -align parameter in distance");
- }
- $method ||= 'JukesCantor';
- foreach my $m ( keys %DistanceMethods ) {
- if(defined $m && $method =~ /$m/i ) {
- my $mtd = "D_$DistanceMethods{$m}";
- return $self->$mtd($aln);
- }
- }
- $self->warn("Unrecognized distance method $method must be one of [".
- join(',',$self->available_distance_methods())."]");
- return undef;
-}
-
-=head2 available_distance_methods
-
- Title : available_distance_methods
- Usage : my @methods = $stats->available_distance_methods();
- Function: Enumerates the possible distance methods
- Returns : Array of strings
- Args : none
-
-
-=cut
-
-sub available_distance_methods{
- my ($self,@args) = @_;
- return values %DistanceMethods;
-}
-
-=head2 D - distance methods
-
-=cut
-
-=head2 D_JukesCantor
-
- Title : D_JukesCantor
- Usage : my $d = $stat->D_JukesCantor($aln)
- Function: Calculates D (pairwise distance) between 2 sequences in an
- alignment using the Jukes-Cantor 1 parameter model.
- Returns : ArrayRef of all pairwise distances of all sequence pairs in the alignment
- Args : Bio::Align::AlignI of DNA sequences
- double - gap penalty
-
-
-=cut
-
-sub D_JukesCantor{
- my ($self,$aln,$gappenalty) = @_;
- return 0 unless $self->_check_arg($aln);
- $gappenalty = $DefaultGapPenalty unless defined $gappenalty;
- # ambiguities ignored at this point
-
- my (@seqs);
- foreach my $seq ( $aln->each_seq) {
- push @seqs, [ split(//,uc $seq->seq())];
- }
- my $seqct = scalar @seqs;
- my @DVals;
- for(my $i = 1; $i <= $seqct; $i++ ) {
- for( my $j = $i+1; $j <= $seqct; $j++ ) {
- my ($matrix,$pfreq,$gaps) = $self->_build_nt_matrix($seqs[$i-1],
- $seqs[$j-1]);
- # just want diagonals
- my $m = ( $matrix->[0]->[0] + $matrix->[1]->[1] +
- $matrix->[2]->[2] + $matrix->[3]->[3] );
- my $D = 1 - ( $m / ($aln->length - $gaps + ( $gaps * $gappenalty)));
- my $d = (- 3 / 4) * log ( 1 - (4 * $D/ 3));
- $DVals[$i]->[$j] = $DVals[$j]->[$i] = $d;
- }
- }
- return \@DVals;
-}
-
-=head2 D_F81
-
- Title : D_F81
- Usage : my $d = $stat->D_F81($aln)
- Function: Calculates D (pairwise distance) between 2 sequences in an
- alignment using the Felsenstein 1981 distance model.
- Returns : ArrayRef of a 2d array of all pairwise distances in the alignment
- Args : Bio::Align::AlignI of DNA sequences
-
-
-=cut
-
-sub D_F81{
- my ($self,$aln) = @_;
- return 0 unless $self->_check_arg($aln);
- $self->throw("This isn't implemented yet - sorry");
-}
-
-
-# M Kimura, J. Mol. Evol., 1980, 16, 111.
-
-=head2 D_Kimura
-
- Title : D_Kimura
- Usage : my $d = $stat->D_Kimura($aln)
- Function: Calculates D (pairwise distance) between 2 sequences in an
- alignment using the Kimura 2 parameter model.
- Returns : ArrayRef of pairwise distances between all sequences in alignment
- Args : Bio::Align::AlignI of DNA sequences
-
-
-=cut
-
-sub D_Kimura{
- my ($self,$aln) = @_;
- return 0 unless $self->_check_arg($aln);
- my $seqct = $aln->no_sequences;
- my @KVals;
- for( my $i = 1; $i <= $seqct; $i++ ) {
- for( my $j = $i+1; $j <= $seqct; $j++ ) {
- my $pairwise = $aln->select_noncont($i,$j);
- my $L = $self->pairwise_stats->number_of_comparable_bases($pairwise);
- my $P = $self->transitions($pairwise) / $L;
- my $Q = $self->transversions($pairwise) / $L;
-
- my $a = 1 / ( 1 - (2 * $P) - $Q);
- my $b = 1 / ( 1 - 2 * $Q );
- my $K = (1/2) * log ( $a ) + (1/4) * log($b);
- $KVals[$i]->[$j] = $K;
- $KVals[$j]->[$i] = $K;
- }
- }
- return \@KVals;
-}
-
-# K Tamura, Mol. Biol. Evol. 1992, 9, 678.
-
-=head2 D_Tamura
-
- Title : D_Tamura
- Usage :
- Function:
- Returns :
- Args :
-
-
-=cut
-
-sub D_Tamura{
- my ($self,$aln) = @_;
- my $seqct = $aln->no_sequences;
- my @KVals;
- for( my $i = 1; $i <= $seqct; $i++ ) {
- for( my $j = $i+1; $j <= $seqct; $j++ ) {
- }
- }
- my $O = 0.25;
- my $t = 0;
- my $a = 0;
- my $b = 0;
-
-
- my $d = 4 * $O * ( 1 - $O ) * $a * $t + 2 * $b * $t;
- return $d;
-}
-
-=head2 D_F84
-
- Title : D_F84
- Usage : my $d = $stat->D_F84($aln)
- Function: Calculates D (pairwise distance) between 2 sequences in an
- alignment using the Felsenstein 1984 distance model.
- Returns : Distance value
- Args : Bio::Align::AlignI of DNA sequences
- double - gap penalty
-
-=cut
-
-sub D_F84{
- my ($self,$aln) = @_;
- return 0 unless $self->_check_arg($aln);
-}
-
-# Tajima and Nei, Mol. Biol. Evol. 1984, 1, 269.
-
-=head2 D_TajimaNei
-
- Title : D_TajimaNei
- Usage : my $d = $stat->D_TajimaNei($aln)
- Function: Calculates D (pairwise distance) between 2 sequences in an
- alignment using the TajimaNei 1984 distance model.
- Returns : Distance value
- Args : Bio::Align::AlignI of DNA sequences
-
-
-=cut
-
-sub D_TajimaNei{
- my ($self,$aln) = @_;
- $self->warn("The result from this method is not correct right now");
- my (@seqs);
- foreach my $seq ( $aln->each_seq) {
- push @seqs, [ split(//,uc $seq->seq())];
- }
- my $seqct = scalar @seqs;
- my @DVals;
- for(my $i = 1; $i <= $seqct; $i++ ) {
- for( my $j = $i+1; $j <= $seqct; $j++ ) {
- my ($matrix,$pfreq,$gaps) = $self->_build_nt_matrix($seqs[$i-1],
- $seqs[$j-1]);
- my $fij2;
- my $slen = $aln->length - $gaps;
- for( my $bs = 0; $bs < 4; $bs++ ) {
- my $fi = 0;
- map {$fi += $matrix->[$bs]->[$_] } 0..3;
- my $fj = 0;
- map { $fj += $matrix->[$_]->[$bs] } 0..3;
- my $fij = ( $fi && $fj ) ? ($fi + $fj) /( 2 * $slen) : 0;
- $fij2 += $fij**2;
- }
- my ($pair,$h) = (0,0);
- for( my $bs = 0; $bs < 3; $bs++ ) {
- for( my $bs1 = $bs+1; $bs1 <= 3; $bs1++ ) {
- my $fij = $pfreq->[$pair++] / $slen;
- if( $fij ) {
-
- my ($ci1,$ci2,$cj1,$cj2) = (0,0,0,0);
-
- map { $ci1 += $matrix->[$_]->[$bs] } 0..3;
- map { $cj1 += $matrix->[$bs]->[$_] } 0..3;
- map { $ci2 += $matrix->[$_]->[$bs1] } 0..3;
- map { $cj2 += $matrix->[$bs1]->[$_] } 0..3;
-
- $h += ( $fij*$fij / 2 ) /
- ( ( ( $ci1 + $cj1 ) / 2 * $slen ) *
- ( ( $ci2 + $cj2 ) /2 * $slen )
- );
- $self->debug( "h is $h fij = $fij ci1 =$ci1 cj1=$cj1 ci2=$ci2 cj2=$cj2\n");
- }
- }
- }
- # just want diagonals first
-
- my $m = ( $matrix->[0]->[0] + $matrix->[1]->[1] +
- $matrix->[2]->[2] + $matrix->[3]->[3] );
- my $D = 1 - ( $m / $slen);
-
- my $b = (1-$fij2+(($D**2)/$h)) / 2;
- $self->debug("h is $h fij2 is $fij2 b is $b\n");
-
- my $d = (-1 * $b) * log ( 1 - $D/ $b);
- $DVals[$i]->[$j] = $DVals[$j]->[$i] = $d;
- }
- }
- return \@DVals;
-
-
-}
-
-# HKY -- HASEGAWA, M., H. KISHINO, and T. YANO. 1985
-# Tamura and Nei 1993?
-# GTR?
-
-=head2 K - sequence substitution methods
-
-=cut
-
-=head2 K_JukesCantor
-
- Title : K_JukesCantor
- Usage : my $k = $stats->K_JukesCantor($aln)
- Function: Calculates K - the number of nucleotide substitutions between
- 2 seqs - according to the Jukes-Cantor 1 parameter model
- This only involves the number of changes between two sequences.
- Returns : double
- Args : Bio::Align::AlignI
-
-
-=cut
-
-sub K_JukesCantor{
- my ($self,$aln) = @_;
- return 0 unless $self->_check_arg($aln);
- my $seqct = $aln->no_sequences;
- my @KVals;
- for( my $i = 1; $i <= $seqct; $i++ ) {
- for( my $j = $i+1; $j <= $seqct; $j++ ) {
- my $pairwise = $aln->select_noncont($i,$j);
- my $L = $self->pairwise_stats->number_of_comparable_bases($pairwise);
- my $N = $self->pairwise_stats->number_of_differences($pairwise);
- my $p = $N / $L;
- my $K = - ( 3 / 4) * log ( 1 - (( 4 * $p) / 3 ));
- $KVals[$i]->[$j] = $KVals[$j]->[$i] = $K;
- }
- }
- return \@KVals;
-}
-
-=head2 K_TajimaNei
-
- Title : K_TajimaNei
- Usage : my $k = $stats->K_TajimaNei($aln)
- Function: Calculates K - the number of nucleotide substitutions between
- 2 seqs - according to the Kimura 2 parameter model.
- This does not assume equal frequencies among all the nucleotides.
- Returns : ArrayRef of 2d matrix which contains pairwise K values for
- all sequences in the alignment
- Args : Bio::Align::AlignI
-
-=cut
-
-sub K_TajimaNei {
- my ($self,$aln) = @_;
- return 0 unless $self->_check_arg($aln);
-
- my @seqs;
- foreach my $seq ( $aln->each_seq) {
- push @seqs, [ split(//,uc $seq->seq())];
- }
- my @KVals;
- my $L = $self->pairwise_stats->number_of_comparable_bases($aln);
- my $seqct = scalar @seqs;
- for( my $i = 1; $i <= $seqct; $i++ ) {
- for( my $j = $i+1; $j <= $seqct; $j++ ) {
- my (%q,%y);
- my ($first,$second) = ($seqs[$i-1],$seqs[$j-1]);
-
- for (my $k = 0;$k<$aln->length; $k++ ) {
- next if( $first->[$k] =~ /^$GapChars$/ ||
- $second->[$k] =~ /^$GapChars$/);
-
- $q{$second->[$k]}++;
- $q{$first->[$k]}++;
- if( $first->[$k] ne $second->[$k] ) {
- $y{$first->[$k]}->{$second->[$k]}++;
- }
- }
-
- my $q_sum = 0;
- foreach my $let ( @Nucleotides ) {
- # ct is the number of sequences compared (2)
- # L is the length of the alignment without gaps
- # $ct * $L = total number of nt compared
- my $avg = $q{$let} / ( $SeqCount * $L );
- $q_sum += $avg**2;
- }
- my $b1 = 1 - $q_sum;
- my $h = 0;
- for( my $i = 0; $i <= 2; $i++ ) {
- for( my $j = $i+1; $j <= 3; $j++) {
- $y{$Nucleotides[$i]}->{$Nucleotides[$j]} ||= 0;
- $y{$Nucleotides[$j]}->{$Nucleotides[$i]} ||= 0;
- my $x = ($y{$Nucleotides[$i]}->{$Nucleotides[$j]} +
- $y{$Nucleotides[$j]}->{$Nucleotides[$i]}) / $L;
- $h += ($x ** 2) / ( 2 * $q{$Nucleotides[$i]} *
- $q{$Nucleotides[$j]} );
- }
- }
- my $N = $self->pairwise_stats->number_of_differences($aln);
- my $p = $N / $L;
- my $b = ( $b1 + $p ** 2 / $h ) / 2;
- my $K = - $b * log ( 1 - $p / $b );
- $KVals[$i]->[$j] = $KVals[$j]->[$i] = $K;
- }
- }
- return \@KVals;
-}
-
-
-
-=head2 transversions
-
- Title : transversions
- Usage : my $transversions = $stats->transversion($aln);
- Function: Calculates the number of transversions between two sequences in
- an alignment
- Returns : integer
- Args : Bio::Align::AlignI
-
-
-=cut
-
-sub transversions{
- my ($self,$aln) = @_;
- return $self->_trans_count_helper($aln, $DNAChanges{'Transversions'});
-}
-
-=head2 transitions
-
- Title : transitions
- Usage : my $transitions = Bio::Align::DNAStatistics->transitions($aln);
- Function: Calculates the number of transitions in a given DNA alignment
- Returns : integer representing the number of transitions
- Args : Bio::Align::AlignI object
-
-
-=cut
-
-sub transitions{
- my ($self,$aln) = @_;
- return $self->_trans_count_helper($aln, $DNAChanges{'Transitions'});
-}
-
-
-sub _trans_count_helper {
- my ($self,$aln,$type) = @_;
- return 0 unless( $self->_check_arg($aln) );
- if( ! $aln->is_flush ) { $self->throw("must be flush") }
- my (@seqs,@tcount);
- foreach my $seq ( $aln->get_seq_by_pos(1), $aln->get_seq_by_pos(2) ) {
- push @seqs, [ split(//,$seq->seq())];
- }
- my ($first,$second) = @seqs;
-
- for (my $i = 0;$i<$aln->length; $i++ ) {
- next if( $first->[$i] =~ /^$GapChars$/ ||
- $second->[$i] =~ /^$GapChars$/);
- if( $first->[$i] ne $second->[$i] ) {
- foreach my $nt ( @{$type->{$first->[$i]}} ) {
- if( $nt eq $second->[$i]) {
- $tcount[$i]++;
- }
- }
- }
- }
- my $sum = 0;
- map { if( $_) { $sum += $_} } @tcount;
- return $sum;
-}
-
-# this will generate a matrix which records across the row, the number
-# of DNA subst
-#
-sub _build_nt_matrix {
- my ($self,$seqa,$seqb) = @_;
-
-
- my $basect_matrix = [ [ qw(0 0 0 0) ], # number of bases that match
- [ qw(0 0 0 0) ],
- [ qw(0 0 0 0) ],
- [ qw(0 0 0 0) ] ];
- my $gaps = 0; # number of gaps
- my $pfreq = [ qw( 0 0 0 0 0 0)]; # matrix for pair frequency
-
- for( my $i = 0; $i < scalar @$seqa; $i++) {
-
- my ($ti,$tj) = ($seqa->[$i],$seqb->[$i]);
- $ti =~ tr/U/T/;
- $tj =~ tr/U/T/;
-
- if( $ti =~ /^$GapChars$/) { $gaps++; next; }
- if( $tj =~ /^$GapChars$/) { $gaps++; next }
-
- my $ti_index = $NucleotideIndexes{$ti};
- my $tj_index = $NucleotideIndexes{$tj};
-
- if( ! defined $ti_index ) {
- print "ti_index not defined for $ti\n";
- next;
- }
-
- $basect_matrix->[$ti_index]->[$tj_index]++;
-
- if( $ti ne $tj ) {
- $pfreq->[$NucleotideIndexes{join('',sort ($ti,$tj))}]++;
- }
- }
- return ($basect_matrix,$pfreq,$gaps);
-}
-
-sub _check_arg {
- my($self,$aln ) = @_;
- if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) {
- $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::DNAStatistics");
- return 0;
- } elsif( $aln->get_seq_by_pos(1)->alphabet ne 'dna' ) {
- $self->warn("Must provide a DNA alignment to Bio::Align::DNAStatistics, you provided a " . $aln->get_seq_by_pos(1)->alphabet);
- return 0;
- }
- return 1;
-}
-
-=head2 Data Methods
-
-=cut
-
-=head2 pairwise_stats
-
- Title : pairwise_stats
- Usage : $obj->pairwise_stats($newval)
- Function:
- Returns : value of pairwise_stats
- Args : newvalue (optional)
-
-
-=cut
-
-sub pairwise_stats{
- my ($self,$value) = @_;
- if( defined $value) {
- $self->{'_pairwise_stats'} = $value;
- }
- return $self->{'_pairwise_stats'};
-
-}
-
-1;
View
175 Bio/Align/PairwiseStatistics.pm
@@ -1,175 +0,0 @@
-# $Id$
-#
-# BioPerl module for Bio::Align::PairwiseStatistics
-#
-# Cared for by Jason Stajich <jason@bioperl.org>
-#
-# Copyright Jason Stajich
-#
-# You may distribute this module under the same terms as perl itself
-
-# POD documentation - main docs before the code
-
-=head1 NAME
-
-Bio::Align::PairwiseStatistics - Base statistic object for Pairwise Alignments
-
-=head1 SYNOPSIS
-
-Give standard usage here
-
-=head1 DESCRIPTION
-
-Describe the object here
-
-=head1 FEEDBACK
-
-=head2 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.
-
- bioperl-l@bioperl.org - General discussion
- http://bioperl.org/MailList.shtml - About the mailing lists
-
-=head2 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
-email or the web:
-
- bioperl-bugs@bioperl.org
- http://bugzilla.bioperl.org/
-
-=head1 AUTHOR - Jason Stajich
-
-Email jason@bioperl.org
-
-Describe contact details here
-
-=head1 CONTRIBUTORS
-
-Additional contributors names and emails here
-
-=head1 APPENDIX
-
-The rest of the documentation details each of the object methods.
-Internal methods are usually preceded with a _
-
-=cut
-
-
-# Let the code begin...
-
-
-package Bio::Align::PairwiseStatistics;
-use vars qw(@ISA $GapChars);
-use strict;
-
-use Bio::Align::StatisticsI;
-use Bio::Root::Root;
-
-BEGIN { $GapChars = '(\.|\-)'; }
-
-@ISA = qw(Bio::Root::Root Bio::Align::StatisticsI );
-
-=head2 number_of_comparable_bases
-
- Title : number_of_comparable_bases
- Usage : my $bases = $stat->number_of_comparable_bases($aln);
- Function: Returns the count of the number of bases that can be
- compared (L) in this alignment ( length - gaps)
- Returns : integer
- Args : Bio::Align::AlignI
-
-
-=cut
-
-sub number_of_comparable_bases{
- my ($self,$aln) = @_;
- if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) {
- $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::PairwiseStatistics");
- return 0;
- } elsif( $aln->no_sequences != 2 ) {
- $self->warn("only pairwise calculations currently supported");
- }
- my $L = $aln->length - $self->number_of_gaps($aln);
- return $L;
-}
-
-=head2 number_of_differences
-
- Title : number_of_differences
- Usage : my $nd = $stat->number_of_distances($aln);
- Function: Returns the number of differences between two
- Returns : integer
- Args : Bio::Align::AlignI
-
-
-=cut
-
-sub number_of_differences{
- my ($self,$aln) = @_;
- if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) {
- $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::PairwiseStatistics");
- return 0;
- } elsif( $aln->no_sequences != 2 ) {
- $self->warn("only pairwise calculations currently supported");
- }
- my (@seqs);
- foreach my $seq ( $aln->each_seq) {
- push @seqs, [ split(//,$seq->seq())];
- }
- my $firstseq = shift @seqs;
-# my $secondseq = shift @seqs;
- my $diffcount = 0;
- for (my $i = 0;$i<$aln->length; $i++ ) {
- next if( $firstseq->[$i] =~ /^$GapChars$/);
- foreach my $seq ( @seqs ) {
- next if( $seq->[$i] =~ /^$GapChars$/);
- if( $firstseq->[$i] ne $seq->[$i] ) {
- $diffcount++;
- }
- }
- }
- return $diffcount;
-}
-
-=head2 number_of_gaps
-
- Title : number_of_gaps
- Usage : my $nd = $stat->number_of_gaps($aln);
- Function: Returns the number of differences between two
- Example :
- Returns :
- Args :
-
-
-=cut
-
-sub number_of_gaps{
- my ($self,$aln) = @_;
- if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) {
- $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::PairwiseStatistics");
- return 0;
- } elsif( $aln->no_sequences != 2 ) {
- $self->warn("only pairwise calculations currently supported");
- }
- my (@seqs);
- foreach my $seq ( $aln->each_seq) {
- push @seqs, [ split(//,$seq->seq())];
- }
- my $firstseq = shift @seqs;
-# my $secondseq = shift @seqs;
- my $gapcount = 0;
- for (my $i = 0;$i<$aln->length; $i++ ) {
- ($gapcount++) && next if( $firstseq->[$i] =~ /^$GapChars$/);
- foreach my $seq ( @seqs ) {
- ($gapcount++) && next if( $seq->[$i] =~ /^$GapChars$/);
- }
- }
- return $gapcount;
-}
-
-1;
View
109 Bio/Align/StatisticsI.pm
@@ -1,109 +0,0 @@
-# $Id$
-#
-# BioPerl module for Bio::Align::StatisticsI
-#
-# Cared for by Jason Stajich <jason@bioperl.org>
-#
-# Copyright Jason Stajich
-#
-# You may distribute this module under the same terms as perl itself
-
-# POD documentation - main docs before the code
-
-=head1 NAME
-
-Bio::Align::StatisticsI - Calculate some statistics for an alignment
-
-=head1 SYNOPSIS
-
-Give standard usage here
-
-=head1 DESCRIPTION
-
-Describe the interface here
-
-=head1 FEEDBACK
-
-=head2 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.
-
- bioperl-l@bioperl.org - General discussion
- http://bioperl.org/MailList.shtml - About the mailing lists
-
-=head2 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
-email or the web:
-
- bioperl-bugs@bioperl.org
- http://bugzilla.bioperl.org/
-
-=head1 AUTHOR - Jason Stajich
-
-Email jason@bioperl.org
-
-Describe contact details here
-
-=head1 CONTRIBUTORS
-
-Additional contributors names and emails here
-
-=head1 APPENDIX
-
-The rest of the documentation details each of the object methods.
-Internal methods are usually preceded with a _
-
-=cut
-
-
-# Let the code begin...
-
-
-package Bio::Align::StatisticsI;
-use strict;
-use vars qw(@ISA);
-
-use Bio::Root::RootI;
-
-@ISA = qw(Bio::Root::RootI);
-
-=head2 distance
-
- Title : distance
- Usage : my $distance_mat = $stats->distance(-align => $aln,
- -method => $method);
- Function: Calculates a distance matrix for all pairwise distances of
- sequences in an alignment.
- Returns : Array ref
- Args : -align => Bio::Align::AlignI object
- -method => String specifying specific distance method
- (implementing class may assume a default)
-
-=cut
-
-sub distance{
- my ($self,@args) = @_;
- $self->throw_not_implemented();
-}
-
-=head2 available_distance_methods
-
- Title : available_distance_methods
- Usage : my @methods = $stats->available_distance_methods();
- Function: Enumerates the possible distance methods
- Returns : Array of strings
- Args : none
-
-
-=cut
-
-sub available_distance_methods{
- my ($self,@args) = @_;
- $self->throw_not_implemented();
-}
-
-1;
View
161 Bio/Align/Utilities.pm
@@ -1,161 +0,0 @@
-# $Id$
-#
-# BioPerl module for Bio::Align::Utilities
-#
-# Cared for by Jason Stajich <jason@bioperl.org>
-#
-# Copyright Jason Stajich
-#
-# You may distribute this module under the same terms as perl itself
-
-# POD documentation - main docs before the code
-
-=head1 NAME
-
-Bio::Align::Utilities - A collection of utilities regarding converting and manipulating alignment objects
-
-=head1 SYNOPSIS
-
-use Bio::Align::Utilities qw(aa_to_dna_aln);
-
-my $dna_aln = aa_to_dna_aln($aaaln,\%dnaseqs);
-
-
-=head1 DESCRIPTION
-
-This module contains utility methods for manipulating sequence
-alignments ( L<Bio::Align::AlignI>) objects.
-
-The B<aa_to_dna_aln> utility is essentially the same as the B<mrtrans>
-program by Bill Pearson available at
-ftp://ftp.virginia.edu/pub/fasta/other/mrtrans.shar. Of course this
-is a pure-perl implementation, but just to mention that if anything
-seems odd you can check the alignments generated against Bill's
-program.
-
-=head1 FEEDBACK
-
-=head2 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.
-
- bioperl-l@bioperl.org - General discussion
- http://bioperl.org/MailList.shtml - About the mailing lists
-
-=head2 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
-email or the web:
-
- bioperl-bugs@bioperl.org
- http://bugzilla.bioperl.org/
-
-=head1 AUTHOR - Jason Stajich
-
-Email jason@bioperl.org
-
-=head1 CONTRIBUTORS
-
-Additional contributors names and emails here
-
-=head1 APPENDIX
-
-The rest of the documentation details each of the object methods.
-Internal methods are usually preceded with a _
-
-=cut
-
-#' keep my emacs happy
-# Let the code begin...
-
-
-package Bio::Align::Utilities;
-use vars qw(@ISA @EXPORT @EXPORT_OK);
-use strict;
-use Carp;
-require Exporter;
-
-@ISA = qw(Exporter);
-
-@EXPORT = qw();
-@EXPORT_OK = qw(aa_to_dna_aln);
-
-use constant CODONSIZE => 3;
-
-=head2 aa_to_dna_aln
-
- Title : aa_to_dna_aln
- Usage : my $dnaaln = aa_to_dna_aln($aa_aln, \%seqs);
- Function: Will convert an AA alignment to DNA space given the
- corresponding DNA sequences. Note that this method expects
- the DNA sequences to be in frame +1 (GFF frame 0) as it will
- start to project into coordinates starting at the first base of
- the DNA sequence, if this alignment represents a different
- frame for the cDNA you will need to edit the DNA sequences
- to remove the 1st or 2nd bases (and revcom if things should be).
- Returns : Bio::Align::AlignI object
- Args : 2 arguments, the alignment and a hashref.
- Alignment is a Bio::Align::AlignI of amino acid sequences.
- The hash reference should have keys which are
- the display_ids for the aa
- sequences in the alignment and the values are a
- Bio::PrimarySeqI object for the corresponding
- spliced cDNA sequence.
-
-See also: L<Bio::Align::AlignI>, L<Bio::SimpleAlign>, L<Bio::PrimarySeq>
-
-=cut
-
-sub aa_to_dna_aln {
- my ($aln,$dnaseqs) = @_;
- unless( defined $aln &&
- ref($aln) &&
- $aln->isa('Bio::Align::AlignI') ) {
- croak('Must provide a valid Bio::Align::AlignI object as the first argument to aa_to_dna_aln, see the documentation for proper usage and the method signature');
- }
- my $alnlen = $aln->length;
- #print "HSP length is $alnlen\n";
- my $dnaalign = new Bio::SimpleAlign;
- foreach my $seq ( $aln->each_seq ) {
- my $newseq;
- my $dnaseq = $dnaseqs->{$seq->display_id} || croak("cannot find ".
- $seq->display_id);
- foreach my $pos ( 1..$alnlen ) {
- my $loc = $seq->location_from_column($pos);
- my $dna = '';
- if( !defined $loc || $loc->location_type ne 'EXACT' ) {
- $dna = '---';
- } else {
- # To readjust to codon boundaries
- # end needs to be +1 so we can just multiply by CODONSIZE
- # to get this
-
- my ($start,$end) = ((($loc->start - 1)* CODONSIZE) +1,
- ($loc->end)* CODONSIZE);
-
- if( $start <=0 || $end > $dnaseq->length() ) {
- print STDERR "start is ", $loc->start, " end is ", $loc->end, " while dnaseq length is ", $dnaseq->length(), " and start/end projected are $start,$end \n";
- warn("codons don't seem to be matching up for $start,$end");
- $dna = '---';
- } else {
- $dna = $dnaseq->subseq($start,$end);
- }
- }
- $newseq .= $dna;
- }
- # funky looking math is to readjust to codon boundaries and deal
- # with fact that sequence start with 1
- my $newdna = new Bio::LocatableSeq(-display_id => $seq->id(),
- -start => (($seq->start - 1) *
- CODONSIZE) + 1,
- -end => ($seq->end * CODONSIZE),
- -strand => $seq->strand,
- -seq => $newseq);
- $dnaalign->add_seq($newdna);
- }
- return $dnaalign;
-}
-1;
View
505 Bio/AlignIO.pm
@@ -1,505 +0,0 @@
-# $Id$
-#
-# BioPerl module for Bio::AlignIO
-#
-# based on the Bio::SeqIO module
-# by Ewan Birney <birney@sanger.ac.uk>
-# and Lincoln Stein <lstein@cshl.org>
-#
-# Copyright Peter Schattner
-#
-# You may distribute this module under the same terms as perl itself
-#
-# _history
-# October 18, 1999 SeqIO largely rewritten by Lincoln Stein
-# September, 2000 AlignIO written by Peter Schattner
-
-# POD documentation - main docs before the code
-
-=head1 NAME
-
-Bio::AlignIO - Handler for AlignIO Formats
-
-=head1 SYNOPSIS
-
- use Bio::AlignIO;
-
- $inputfilename = "testaln.fasta";
- $in = Bio::AlignIO->new(-file => $inputfilename ,
- '-format' => 'fasta');
- $out = Bio::AlignIO->new(-file => ">out.aln.pfam" ,
- '-format' => 'pfam');
- # note: we quote -format to keep older perl's from complaining.
-
- while ( my $aln = $in->next_aln() ) {
- $out->write_aln($aln);
- }
-
-or
-
- use Bio::AlignIO;
-
- $inputfilename = "testaln.fasta";
- $in = Bio::AlignIO->newFh(-file => $inputfilename ,
- '-format' => 'fasta');
- $out = Bio::AlignIO->newFh('-format' => 'pfam');
-
- # World's shortest Fasta<->pfam format converter:
- print $out $_ while <$in>;
-
-=head1 DESCRIPTION
-
-Bio::AlignIO is a handler module for the formats in the AlignIO set
-(eg, Bio::AlignIO::fasta). It is the officially sanctioned way of
-getting at the alignment objects, which most people should use. The
-resulting alignment is a Bio::Align::AlignI compliant object. See
-L<Bio::Align::AlignI> for more information.
-
-The idea is that you request a stream object for a particular format.
-All the stream objects have a notion of an internal file that is read
-from or written to. A particular AlignIO object instance is configured
-for either input or output. A specific example of a stream object is
-the Bio::AlignIO::fasta object.
-
-Each stream object has functions
-
- $stream->next_aln();
-
-and
-
- $stream->write_aln($aln);
-
-also
-
- $stream->type() # returns 'INPUT' or 'OUTPUT'
-
-As an added bonus, you can recover a filehandle that is tied to the
-AlignIO object, allowing you to use the standard E<lt>E<gt> and print
-operations to read and write sequence objects:
-
- use Bio::AlignIO;
-
- # read from standard input
- $stream = Bio::AlignIO->newFh(-format => 'Fasta');
-
- while ( $aln = <$stream> ) {
- # do something with $aln
- }
-
-and
-
- print $stream $aln; # when stream is in output mode
-
-This makes the simplest ever reformatter
-
- #!/usr/local/bin/perl
-
- $format1 = shift;
- $format2 = shift ||
- die "Usage: reformat format1 format2 < input > output";
-
- use Bio::AlignIO;
-
- $in = Bio::AlignIO->newFh(-format => $format1 );
- $out = Bio::AlignIO->newFh(-format => $format2 );
- # note: you might want to quote -format to keep
- # older perl's from complaining.
-
- print $out $_ while <$in>;
-
-AlignIO.pm is patterned on the module SeqIO.pm and shares most the
-SeqIO.pm features. One significant difference currently is that
-AlignIO.pm usually handles IO for only a single alignment at a time
-(SeqIO.pm handles IO for multiple sequences in a single stream.) The
-principal reason for this is that whereas simultaneously handling
-multiple sequences is a common requirement, simultaneous handling of
-multiple alignments is not. The only current exception is format
-"bl2seq" which parses results of the Blast bl2seq program and which
-may produce several alignment pairs. This set of alignment pairs can
-be read using multiple calls to next_aln.
-
-Capability for IO for more than one multiple alignment - other than
-for bl2seq format -(which may be of use for certain applications such
-as IO for Pfam libraries) may be included in the future. For this
-reason we keep the name "next_aln()" for the alignment input routine,
-even though in most cases only one alignment is read (or written) at a
-time and the name "read_aln()" might be more appropriate.
-
-=head1 CONSTRUCTORS
-
-=head2 Bio::AlignIO-E<gt>new()
-
- $seqIO = Bio::AlignIO->new(-file => 'filename', -format=>$format);
- $seqIO = Bio::AlignIO->new(-fh => \*FILEHANDLE, -format=>$format);
- $seqIO = Bio::AlignIO->new(-format => $format);
-
-The new() class method constructs a new Bio::AlignIO object. The
-returned object can be used to retrieve or print BioAlign
-objects. new() accepts the following parameters:
-
-=over 4
-
-=item -file
-
-A file path to be opened for reading or writing. The usual Perl
-conventions apply:
-
- 'file' # open file for reading
- '>file' # open file for writing
- '>>file' # open file for appending
- '+<file' # open file read/write
- 'command |' # open a pipe from the command
- '| command' # open a pipe to the command
-
-=item -fh
-
-You may provide new() with a previously-opened filehandle. For
-example, to read from STDIN:
-
- $seqIO = Bio::AlignIO->new(-fh => \*STDIN);
-
-Note that you must pass filehandles as references to globs.
-
-If neither a filehandle nor a filename is specified, then the module
-will read from the @ARGV array or STDIN, using the familiar E<lt>E<gt>
-semantics.
-
-=item -format
-
-Specify the format of the file. Supported formats include:
-
- fasta FASTA format
- selex selex (hmmer) format
- stockholm stockholm format
- prodom prodom (protein domain) format
- clustalw clustalw (.aln) format
- msf msf (GCG) format
- mase mase (seaview) format
- bl2seq Bl2seq Blast output
- nexus Swofford et al NEXUS format
- pfam Pfam sequence alignment format
- phylip Felsenstein's PHYLIP format
- emboss EMBOSS water and needle format
- mega MEGA format
- meme MEME format
- psi PSI-BLAST format
-
-Currently only those formats which were implemented in L<Bio::SimpleAlign>
-have been incorporated in AlignIO.pm. Specifically, mase, stockholm
-and prodom have only been implemented for input. See the specific module
-(e.g. L<Bio::AlignIO::meme>) for notes on supported versions.
-
-If no format is specified and a filename is given, then the module
-will attempt to deduce it from the filename suffix. If this is unsuccessful,
-Fasta format is assumed.
-
-The format name is case insensitive. 'FASTA', 'Fasta' and 'fasta' are
-all supported.
-
-=back
-
-=head2 Bio::AlignIO-E<gt>newFh()
-
- $fh = Bio::AlignIO->newFh(-fh => \*FILEHANDLE, -format=>$format);
- $fh = Bio::AlignIO->newFh(-format => $format);
- # etc.
-
-This constructor behaves like new(), but returns a tied filehandle
-rather than a Bio::AlignIO object. You can read sequences from this
-object using the familiar E<lt>E<gt> operator, and write to it using print().
-The usual array and $_ semantics work. For example, you can read all
-sequence objects into an array like this:
-
- @sequences = <$fh>;
-
-Other operations, such as read(), sysread(), write(), close(), and printf()
-are not supported.
-
-=over 1
-
-=item -flush
-
-By default, all files (or filehandles) opened for writing alignments
-will be flushed after each write_aln() (making the file immediately
-usable). If you don't need this facility and would like to marginally
-improve the efficiency of writing multiple sequences to the same file
-(or filehandle), pass the -flush option '0' or any other value that
-evaluates as defined but false:
-
- my $clustal = new Bio::AlignIO -file => "<prot.aln",
- -format => "clustalw";
- my $msf = new Bio::AlignIO -file => ">prot.msf",
- -format => "msf",
- -flush => 0; # go as fast as we can!
- while($seq = $clustal->next_aln) { $msf->write_aln($seq) }
-
-=back
-
-=head1 OBJECT METHODS
-
-See below for more detailed summaries. The main methods are:
-
-=head2 $alignment = $AlignIO-E<gt>next_aln()
-
-Fetch an alignment from a formatted file.
-
-=head2 $AlignIO-E<gt>write_aln($aln)
-
-Write the specified alignment to a file..
-
-=head2 TIEHANDLE(), READLINE(), PRINT()
-
-These provide the tie interface. See L<perltie> for more details.
-
-=head1 FEEDBACK
-
-=head2 Mailing Lists
-
-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://bio.perl.org/MailList.html - About the mailing lists
-
-=head2 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 email or the web: