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