in progress...
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 3 Mar 2011 18:33:35 +0000 (18:33 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 3 Mar 2011 18:33:35 +0000 (18:33 +0000)
forester/ruby/scripts/bioruby_examples/msa_1.rb

index bb8210b..b27d913 100644 (file)
@@ -3,6 +3,16 @@ require 'bio'
  
 #############
 
+seqs = Bio::Alignment::MultiFastaFormat.new(File.open('bcl2.fasta').read)
+seqs.entries.each do |seq|
+  puts seq.to_seq.output(:genbank)
+end
+
+
+
+##############
+
+
 # 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'))
@@ -13,7 +23,7 @@ msa = report.alignment
 # Goes through all sequences in 'msa' and prints the
 # actual molecular sequence.
 msa.each do |entry|
-  puts entry.seq
+ # puts entry.seq
 end
 
 ##############
@@ -39,6 +49,7 @@ file.each do |entry|
   # do something on each fasta sequence entry
 end
 
+exit
 ##############
 
 # Creates a new file named "outfile.fasta" and writes