Skip to content

Commit

Permalink
merge_pairwise working
Browse files Browse the repository at this point in the history
  • Loading branch information
jtprince committed Feb 12, 2010
1 parent af014cb commit b12a9db
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
pkg/
rdoc/
backup/
config/
data/
*.swp
33 changes: 22 additions & 11 deletions spec/align_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,27 @@
@conc = '--A?A-AT?TTGGGGGCCCAAC?C---'
@testcase = "testcase.fasta"

@pa = [ ["--ABCDEFGHIJKLMNOP", "-----DEFGHIJK-MN--"],
["--ABCDEFGHIJKLM-NOP", "--ABCDE---IJKLMZNOP"],
["--ABCDEFGHIJKLMNOP", "-------------LMNOP"],
["--ABCDEFGHIJKLMNOP", "------ABCDEFGHIJKLMN--"],
["--ABCDEFGHIJKLMNOP", "--ABC------JKLM--P"],
["--ABC--DEFGHIJKLMNOP", "--ABCZZDEFGHIJKLMNOP"],
@pa = [ ["--ABCDEFGHIJKLMNOP",
"-----DEFGHIJK-MN--"],
["--ABCDEFGHIJKLM-NOP",
"--ABCDE---IJKLMZNOP"],
["--ABCDEFGHIJKLMNOP",
"-------------LMNOP"],
["--ABCDEFGHIJKLMNOP",
"--ABCDEFGHIJKLMN--"],
["--ABCDEFGHIJKLMNOP",
"--ABC------JKLM--P"],
["--ABC--DEFGHIJKLMNOP",
"--ABCZZDEFGHIJKLMNOP"],
]
@template = "--ABC--DEFGHIJKLM-NO"
@aligned = ["-------DEFGHIJK-M-N-",
"--ABC--DE---IJKLMZNO",
"---------------LM-NO",
"--ABC--DEFGHIJKLM-N-",
"--ABC--------JKLM---",
"--ABCZZDEFGHIJKLM-NO"
]
end

it 'removes bad ends' do
Expand All @@ -25,10 +39,7 @@

it 'aligns pairwise' do
(template, others) = Bio::Alignment::DNASequenceReads.merge_pairwise(@pa)
template.is "--ABC--DEFGHIJKLM-NO"

###############################
HERE
others.enums
template.is @template
@aligned.enums others
end
end

0 comments on commit b12a9db

Please sign in to comment.