08b02e16d5890dd26837c1d5030c50ba71a84400
[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 == Multiple Sequence Alignment Input and Output ==
11
12 === Reading in a Multiple Sequence Alignments from a File ===
13
14 _... to be done_
15
16 {{{
17 #!/usr/bin/env ruby
18 require 'bio'
19
20 }}}
21
22
23 === Writing a Multiple Sequence Alignment to a File ===
24
25 _... to be done_
26
27 {{{
28 #!/usr/bin/env ruby
29 require 'bio'
30
31 }}}
32
33
34
35 == Calculating Multiple Sequence Alignments  ==
36
37 !BioRuby can be used to execute a variety of multiple sequence alignment
38 programs (such as [http://mafft.cbrc.jp/alignment/software/ MAFFT], [http://probcons.stanford.edu/ Probcons], [http://www.clustal.org/ ClustalW], [http://www.drive5.com/muscle/ Muscle]). 
39 In the following, examples for using the MAFFT and Muscle are shown.
40
41
42 === MAFFT ===
43
44 {{{
45 #!/usr/bin/env ruby
46 require 'bio'
47
48 # Calculates the alignment using the MAFFT program on the local
49 # machine with options '--maxiterate 1000 --localpair'
50 # and stores the result in 'report'.
51 options = ['--maxiterate', '1000', '--localpair']
52 mafft = Bio::MAFFT.new('path/to/mafft', options)
53 report = mafft.query_align( seqs)
54
55 # Accesses the actual alignment
56 align = report.alignment
57
58 # Prints each sequence to the console.
59 report.align.each { |s| puts s.to_s }
60 #
61 }}}
62
63
64 === Muscle ===
65
66 {{{
67 #!/usr/bin/env ruby
68 require 'bio'
69
70 # Calculates the alignment using the Muscle program on the local
71 # machine with options '-quiet -maxiters 64'
72 # and stores the result in 'report'.
73 options = ['-quiet', '-maxiters', '64']
74 muscle = Bio::Muscle.new('path/to/muscle', options)
75 report = muscle.query_align( seqs)
76
77 # Accesses the actual alignment
78 align = report.alignment
79
80 # Prints each sequence to the console.
81 report.align.each { |s| puts s.to_s }
82 #
83 }}}
84
85
86 == Manipulating Multiple Sequence Alignments ==
87
88 It is probably a good idea to 'clean up' multiple sequence to be used
89 for phylogenetic inference. For instance, columns with more than 50% gaps can be deleted, like so:
90
91
92 _... to be done_
93
94 {{{
95 #!/usr/bin/env ruby
96 require 'bio'
97
98 }}}
99
100
101 = Phylogenetic Trees =
102
103 == Phylogenetic Tree Input and Output ==
104
105 === Reading in of Phylogenetic Trees ===
106
107 _... to be done_
108
109 {{{
110 #!/usr/bin/env ruby
111 require 'bio'
112
113 }}}
114
115 Also, see: https://www.nescent.org/wg_phyloinformatics/BioRuby_PhyloXML_HowTo_documentation
116
117 === Writing of Phylogenetic Trees ===
118
119 _... to be done_
120
121 {{{
122 #!/usr/bin/env ruby
123 require 'bio'
124
125 }}}
126
127 Also, see: https://www.nescent.org/wg_phyloinformatics/BioRuby_PhyloXML_HowTo_documentation
128
129
130 == Phylogenetic Inference ==
131
132 _Currently !BioRuby does not contain wrappers for phylogenetic inference programs, thus I am progress of writing a RAxML wrapper followed by a wrapper for FastMA..._
133
134 == Maximum Likelihood ==
135
136 === RAxML ===
137
138 _... to be done_
139
140 {{{
141 #!/usr/bin/env ruby
142 require 'bio'
143
144 }}}
145
146
147 == Pairwise Distance Based Methods ==
148
149 === FastME ===
150
151 _... to be done_
152
153 {{{
154 #!/usr/bin/env ruby
155 require 'bio'
156
157 }}}
158
159
160 = Analyzing Phylogenetic Trees =
161
162 == Gene Duplication Inference ==
163
164 _need to further test and then import GSoC 'SDI' work..._
165
166
167 == Others? ==