bioruby examples for wiki........
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 23 Feb 2011 22:43:16 +0000 (22:43 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 23 Feb 2011 22:43:16 +0000 (22:43 +0000)
forester/ruby/scripts/bioruby_examples/msa_1.rb [new file with mode: 0644]

diff --git a/forester/ruby/scripts/bioruby_examples/msa_1.rb b/forester/ruby/scripts/bioruby_examples/msa_1.rb
new file mode 100644 (file)
index 0000000..dca6106
--- /dev/null
@@ -0,0 +1,49 @@
+require 'rubygems'
+require 'bio'
+# creating a Bio::Sequence::NA object containing ambiguous alphabets
+#as = Bio::Sequence::NA.new("atgcyrwskmbdhvn")
+
+#print as.to_s
+
+#print "\n"
+
+
+#seq1 = Bio::Sequence::AA.new("gggggg")
+#seq2 = Bio::Sequence::AA.new("ggggt")
+#seq3 = Bio::Sequence::AA.new("ggt")
+
+
+
+seq1 = "KMLFGVVFFFGG"
+seq2 ="LMGGHHF"
+seq3 = "GKKKKGHHHGHRRRGR"
+seq4 = "KKKGHHHGHRERGR"
+seqs = [ seq1, seq2, seq3, seq4 ] 
+
+
+# MAFFT
+options = [ '--maxiterate', '1000', '--localpair' ]
+mafft = Bio::MAFFT.new('/home/zma/SOFTWARE/mafft-6.847-without-extensions/scripts/mafft', options )
+report = mafft.query_align( seqs)
+#puts report.alignment.output_fasta
+report.alignment.each { |x| puts x.to_s }
+puts 'OK'
+puts
+
+#clustalw
+clustalw = Bio::ClustalW.new('/home/zma/SOFTWARE/clustalw-2.1/src/clustalw2' )
+report = clustalw.query_align( seqs)
+#puts report.alignment.output_fasta.to_s
+report.alignment.each { |x| puts x.to_s }
+puts 'OK'
+puts
+
+#muscle
+options = [ '-quiet', '-maxiters', '64' ]
+muscle = Bio::Muscle.new('/home/zma/SOFTWARE/muscle3.8.31/src/muscle', options )
+report = muscle.query_align( seqs)
+#puts report.alignment.output_fasta.to_s
+report.alignment.each { |x| puts x.to_s }
+puts 'OK'
+puts
\ No newline at end of file