020d6a2dd28fbbdb24151827cba884c81c73de9e
[jalview.git] / wiki / PhyloBioRuby.wiki
1 #summary Tutorial for multiple sequence alignments and phylogenetic methods in BioRuby -- under development!
2
3 = Introduction =
4
5 Tutorial for multiple sequence alignments and phylogenetic methods in BioRuby -- under development!.
6
7
8 = Multiple Sequence Alignments =
9
10 == Reading in a Multiple Sequence Alignment from a File ==
11
12 ... to be done
13
14 == Calculating a Multiple Sequence Alignment  ==
15
16 BioRuby can be used to execute a variety of multiple sequence alignment
17 programs (such as MAFFT, Probcons, ClustalW, Muscle). 
18 In the following, examples for using the MAFFT and 
19
20 === MAFFT ===
21
22
23
24 {{{
25 #!/usr/bin/env ruby
26 require 'bio'
27
28 # Calculates the alignment using the MAFFT program
29 # on the local machine with options
30 # '--maxiterate', '1000', '--localpair'
31 # and stores the result in 'report'.
32 options = [ '--maxiterate', '1000', '--localpair' ]
33 mafft = Bio::MAFFT.new('path/to/mafft', options )
34 report = mafft.query_align( seqs)
35
36 # Accesses the actual alignment
37 align = report.alignment
38
39 # Prints each sequence to the console.
40 report.align.each { |s| puts s.to_s }
41 #
42 }}}
43
44 === Muscle ===
45
46 <ruby>
47 #!/usr/bin/env ruby
48 require 'bio'
49
50 # Calculates the alignment using the MAFFT program
51 # on the local machine, and stores the result in 'report'.
52 options = [ '-quiet', '-maxiters', '64' ]
53 muscle = Bio::Muscle.new('path/to/muscle', options )
54 report = muscle.query_align( seqs)
55
56 # Accesses the actual alignment
57 align = report.alignment
58
59 # Prints each sequence to the console.
60 report.align.each { |s| puts s.to_s }
61 #
62 </ruby>
63
64 Add your content here.  Format your content with:
65   * Text in *bold* or _italic_
66   * Headings, paragraphs, and lists
67   * Automatic links to other wiki pages