From b238db9423661e6271b54b2e50e56ecdd801a45b Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Thu, 3 Mar 2011 18:33:35 +0000 Subject: [PATCH] in progress... --- forester/ruby/scripts/bioruby_examples/msa_1.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/forester/ruby/scripts/bioruby_examples/msa_1.rb b/forester/ruby/scripts/bioruby_examples/msa_1.rb index bb8210b..b27d913 100644 --- a/forester/ruby/scripts/bioruby_examples/msa_1.rb +++ b/forester/ruby/scripts/bioruby_examples/msa_1.rb @@ -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 -- 1.7.10.2