= Introduction =
-Tutorial for multiple sequence alignments and phylogenetic methods in !BioRuby -- under development!
+Under development!
+Tutorial for multiple sequence alignments and phylogenetic methods in [http://bioruby.open-bio.org/ BioRuby].
+
+Eventually, this is expected to be placed on the official !BioRuby page.
+
+Author: [http://www.cmzmasek.net/ Christian M Zmasek], Sanford-Burnham Medical Research Institute
+
+
+Copyright (C) 2011 Christian M Zmasek
= Multiple Sequence Alignments =
=== Reading in a Multiple Sequence Alignment from a File ===
-Reading in a clustalw formatted multiple sequence alignment:
+The follow example shows how to read in a *ClustalW*-formatted multiple sequence alignment.
{{{
#!/usr/bin/env ruby
require 'bio'
-# Reads in a clustalw formatted multiple sequence alignment
+# Reads in a ClustalW-formatted multiple sequence alignment
# from a file named "infile_clustalw.aln" and stores it in 'report'.
report = Bio::ClustalW::Report.new(File.read('infile_clustalw.aln'))
=== Writing a Multiple Sequence Alignment to a File ===
-Writing a multiple sequence alignment in fasta format:
+
+The follow example shows how to writing a multiple sequence alignment in *FASTA*-format:
{{{
#!/usr/bin/env ruby
end
}}}
+The following constants determine the output format
-Writing a multiple sequence alignment in clustalw format:
+ * ClustalW: `:clustal`
+ * FASTA: `:fasta`
+ * PHYLIP interleaved (will truncate sequence names to no more than 10 characters): `:phylip`
+ * PHYLIP non-interleaved (will truncate sequence names to no more than 10 characters): `:phylipnon`
+ * MSF: `:msf`
+ * Molphy: `:molphy`
-{{{
-#!/usr/bin/env ruby
-require 'bio'
-# Creates a new file named "outfile.aln" and writes
-# multiple sequence alignment 'align' to it in clustal format.
-File.open('outfile.aln', 'w') do |f|
- f.write(align.output(:clustal))
-end
+For example, the following writes iPHYLIP's non-interleaved format:
+
+{{{
+f.write(align.output(:phylipnon))
}}}
+
== Calculating Multiple Sequence Alignments ==
!BioRuby can be used to execute a variety of multiple sequence alignment
The following example uses the MAFFT program to align four sequences
and then prints the result to the screen.
-If the path to the MAFFT executable is properly set, `mafft = Bio::MAFFT.new(options)` can be used instead of explicitly giving a path.
+Please note that if the path to the MAFFT executable is properly set `mafft=Bio::MAFFT.new(options)` can be used instead of explicitly indicating the path as in the example.
{{{
#!/usr/bin/env ruby
_need to further test and then import GSoC 'SDI' work..._
-== Others? ==
\ No newline at end of file
+== Others? ==
+
+
+----
+
+= Putting It All Together =
+
+Example of a small "pipeline"-type program running a mininal phyogenetic analysis: starting with a set of sequences and ending with a phylogenetic tree.
+
\ No newline at end of file