From 960a6e70f24fbb907e07c1ee0143145faba934cd Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Tue, 1 Mar 2011 03:28:42 +0000 Subject: [PATCH] Edited wiki page PhyloBioRuby through web user interface. --- wiki/PhyloBioRuby.wiki | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wiki/PhyloBioRuby.wiki b/wiki/PhyloBioRuby.wiki index 8bfa497..e881406 100644 --- a/wiki/PhyloBioRuby.wiki +++ b/wiki/PhyloBioRuby.wiki @@ -34,11 +34,11 @@ require 'bio' report = Bio::ClustalW::Report.new(File.read('infile_clustalw.aln')) # Accesses the actual alignment. -align = report.alignment +msa = report.alignment -# Goes through all sequences in 'align' and prints the +# Goes through all sequences in 'msa' and prints the # actual molecular sequence. -align.each do |entry| +msa.each do |entry| puts entry.seq end }}} @@ -48,16 +48,16 @@ end === Writing a Multiple Sequence Alignment to a File === -The follow example shows how to writing a multiple sequence alignment in *FASTA*-format: +The following example shows how to write a multiple sequence alignment in *FASTA*-format. It first creates a file named "outfile.fasta" for writing ('w') and then writes the multiple sequence alignment referred to by variable 'msa' to it in FASTA-format (':fasta'). {{{ #!/usr/bin/env ruby require 'bio' # Creates a new file named "outfile.fasta" and writes -# multiple sequence alignment 'align' to it in fasta format. +# multiple sequence alignment 'msa' to it in fasta format. File.open('outfile.fasta', 'w') do |f| - f.write(align.output(:fasta)) + f.write(msa.output(:fasta)) end }}} -- 1.7.10.2