Edited wiki page PhyloBioRuby through web user interface.
[jalview.git] / wiki / PhyloBioRuby.wiki
index 5ad92c5..91baa22 100644 (file)
@@ -4,8 +4,16 @@
 
 = 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 =
@@ -15,13 +23,13 @@ Tutorial for multiple sequence alignments and phylogenetic methods in !BioRuby -
 
 === 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'))
 
@@ -39,7 +47,8 @@ end
 
 === 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
@@ -52,21 +61,24 @@ File.open('outfile.fasta', 'w') do |f|
 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
@@ -78,7 +90,7 @@ In the following, examples for using the MAFFT and Muscle are shown.
 
 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
@@ -268,4 +280,12 @@ require 'bio'
 _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