bio-alignment 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -4
- data/README.md +94 -9
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/doc/bio-alignment-design.md +75 -11
- data/features/bioruby-feature.rb +17 -0
- data/features/bioruby.feature +6 -1
- data/features/columns-feature.rb +2 -0
- data/features/edit/del_bridges-feature.rb +7 -3
- data/features/edit/del_bridges.feature +1 -2
- data/features/edit/del_non_informative_sequences-feature.rb +26 -0
- data/features/edit/del_non_informative_sequences.feature +19 -0
- data/features/edit/del_short_sequences-feature.rb +21 -0
- data/features/edit/del_short_sequences.feature +25 -0
- data/features/edit/gblocks-feature.rb +2 -2
- data/features/edit/mask_islands-feature.rb +17 -4
- data/features/edit/mask_islands.feature +28 -17
- data/features/edit/mask_serial_mutations-feature.rb +8 -6
- data/features/edit/mask_serial_mutations.feature +11 -11
- data/features/tree-feature.rb +66 -0
- data/features/tree.feature +45 -0
- data/lib/bio-alignment.rb +4 -1
- data/lib/bio-alignment/alignment.rb +58 -3
- data/lib/bio-alignment/codonsequence.rb +14 -2
- data/lib/bio-alignment/columns.rb +102 -0
- data/lib/bio-alignment/edit/del_bridges.rb +18 -1
- data/lib/bio-alignment/edit/del_non_informative_sequences.rb +27 -0
- data/lib/bio-alignment/edit/del_short_sequences.rb +28 -0
- data/lib/bio-alignment/edit/edit_columns.rb +22 -0
- data/lib/bio-alignment/edit/edit_rows.rb +49 -0
- data/lib/bio-alignment/edit/mask_islands.rb +115 -0
- data/lib/bio-alignment/edit/mask_serial_mutations.rb +44 -0
- data/lib/bio-alignment/elements.rb +86 -0
- data/lib/bio-alignment/rows.rb +52 -0
- data/lib/bio-alignment/sequence.rb +20 -14
- data/lib/bio-alignment/state.rb +64 -8
- data/lib/bio-alignment/tree.rb +77 -0
- data/spec/bio-alignment_spec.rb +57 -1
- data/spec/spec_helper.rb +3 -3
- metadata +47 -22
- data/lib/bio-alignment/column.rb +0 -47
data/lib/bio-alignment/column.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
require 'bio-alignment/state'
|
2
|
-
|
3
|
-
module Bio
|
4
|
-
|
5
|
-
module BioAlignment
|
6
|
-
|
7
|
-
# The Columns module provides accessors for the column list
|
8
|
-
# returning Column objects
|
9
|
-
module Columns
|
10
|
-
|
11
|
-
# Return a list of Column objects. The contents of the
|
12
|
-
# columns are accessed lazily
|
13
|
-
def columns
|
14
|
-
(0..num_columns-1).map { | col | Column.new(self,col) }
|
15
|
-
end
|
16
|
-
|
17
|
-
def num_columns
|
18
|
-
rows.first.length
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# Support the notion of columns in an alignment. A column
|
23
|
-
# can have state by attaching state objects
|
24
|
-
class Column
|
25
|
-
include State
|
26
|
-
|
27
|
-
def initialize aln, col
|
28
|
-
@aln = aln
|
29
|
-
@col = col
|
30
|
-
end
|
31
|
-
|
32
|
-
def [] index
|
33
|
-
@aln[index][@col]
|
34
|
-
end
|
35
|
-
|
36
|
-
# iterator fetches a column on demand
|
37
|
-
def each
|
38
|
-
@aln.each do | seq |
|
39
|
-
yield seq[@col]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
47
|
-
|