bioseqalign 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/bioseqalign/LocalAlign.cpp +4 -9
- data/lib/bioseqalign/version.rb +1 -1
- metadata +9 -24
- data/ext/bioseqalign/FitAlign.cpp~ +0 -42
- data/ext/bioseqalign/FitAlign.hpp~ +0 -20
- data/ext/bioseqalign/GlobalAlign.cpp~ +0 -53
- data/ext/bioseqalign/GlobalAlign.hpp~ +0 -53
- data/ext/bioseqalign/LocalAlign.cpp~ +0 -1
- data/ext/bioseqalign/LocalAlign.hpp~ +0 -1
- data/ext/bioseqalign/Makefile +0 -314
- data/ext/bioseqalign/PairwiseAlign.cpp~ +0 -23
- data/ext/bioseqalign/PairwiseAlign.hpp~ +0 -54
- data/ext/bioseqalign/PrefixSuffixAlign.cpp~ +0 -42
- data/ext/bioseqalign/PrefixSuffixAlign.hpp~ +0 -20
- data/ext/bioseqalign/extconf.rb~ +0 -2
- data/ext/bioseqalign/fitalgntest.cpp~ +0 -37
- data/ext/bioseqalign/runTest.rb +0 -35
- data/ext/bioseqalign/runTest.rb~ +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eebe247527833046b360916889bc3e443b58ad88
|
4
|
+
data.tar.gz: 2627922393b2b810d35652fd1e4d8ecb73c83a89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38cedead4c547bbd32abe240de94f11ace65b67c9889ad1a7da33e70a5d83bab0a882844ab0031db401e7096b0644f887760b575f07b80a16428b74005a13687
|
7
|
+
data.tar.gz: b763ec760284ec0ae8ed9733ea77d1f67260e15e67f9288eb49df48ad66d9835b479db4e94f5bb0a58ee665058040ac8a1437a3cd7e0e49d433d5d2d6ef3310a
|
@@ -13,10 +13,8 @@ Rice::Array LocalAlign::getAlignment() {
|
|
13
13
|
assignSource(row(ali, 1), seq2);
|
14
14
|
|
15
15
|
//localAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
16
|
-
localAlignment(ali, Score<int>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
17
|
-
|
18
|
-
//std::cout<<row(ali, 0)<<std::endl;
|
19
|
-
//std::cout<<row(ali, 1)<<std::endl;
|
16
|
+
//localAlignment(ali, Score<int>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
17
|
+
localAlignment(ali, Score<int>(matchScore,mismatchScore,indelScore));
|
20
18
|
|
21
19
|
typedef Iterator<TRow>::Type TRowIterator;
|
22
20
|
TRowIterator it = begin(row(ali, 0));
|
@@ -34,10 +32,6 @@ Rice::Array LocalAlign::getAlignment() {
|
|
34
32
|
else s_row2 += (*it2);
|
35
33
|
}
|
36
34
|
|
37
|
-
// std::cout<<s_row1<<std::endl;
|
38
|
-
// std::cout<<s_row2<<std::endl;
|
39
|
-
// std::cout<<ali<<std::endl;
|
40
|
-
|
41
35
|
return getArrayFromAlignStr(s_row1+s_row2);
|
42
36
|
}
|
43
37
|
|
@@ -48,6 +42,7 @@ void LocalAlign::run() {
|
|
48
42
|
assignSource(row(ali, 0), seq1);
|
49
43
|
assignSource(row(ali, 1), seq2);
|
50
44
|
|
51
|
-
score = localAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
45
|
+
//score = localAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
46
|
+
score = localAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore));
|
52
47
|
}
|
53
48
|
|
data/lib/bioseqalign/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bioseqalign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano R.B.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.1'
|
27
27
|
description: A simple gem to perform fast pairwise sequence alignment using seqan
|
28
28
|
email: stefano.rb@gmail.com
|
29
29
|
executables: []
|
@@ -32,32 +32,17 @@ extensions:
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- ext/bioseqalign/FitAlign.cpp
|
35
|
-
- ext/bioseqalign/FitAlign.cpp~
|
36
35
|
- ext/bioseqalign/FitAlign.hpp
|
37
|
-
- ext/bioseqalign/FitAlign.hpp~
|
38
36
|
- ext/bioseqalign/GlobalAlign.cpp
|
39
|
-
- ext/bioseqalign/GlobalAlign.cpp~
|
40
37
|
- ext/bioseqalign/GlobalAlign.hpp
|
41
|
-
- ext/bioseqalign/GlobalAlign.hpp~
|
42
38
|
- ext/bioseqalign/LocalAlign.cpp
|
43
|
-
- ext/bioseqalign/LocalAlign.cpp~
|
44
39
|
- ext/bioseqalign/LocalAlign.hpp
|
45
|
-
- ext/bioseqalign/LocalAlign.hpp~
|
46
|
-
- ext/bioseqalign/Makefile
|
47
40
|
- ext/bioseqalign/PairwiseAlign.cpp
|
48
|
-
- ext/bioseqalign/PairwiseAlign.cpp~
|
49
41
|
- ext/bioseqalign/PairwiseAlign.hpp
|
50
|
-
- ext/bioseqalign/PairwiseAlign.hpp~
|
51
42
|
- ext/bioseqalign/PrefixSuffixAlign.cpp
|
52
|
-
- ext/bioseqalign/PrefixSuffixAlign.cpp~
|
53
43
|
- ext/bioseqalign/PrefixSuffixAlign.hpp
|
54
|
-
- ext/bioseqalign/PrefixSuffixAlign.hpp~
|
55
44
|
- ext/bioseqalign/extconf.rb
|
56
|
-
- ext/bioseqalign/extconf.rb~
|
57
45
|
- ext/bioseqalign/fitalgntest.cpp
|
58
|
-
- ext/bioseqalign/fitalgntest.cpp~
|
59
|
-
- ext/bioseqalign/runTest.rb
|
60
|
-
- ext/bioseqalign/runTest.rb~
|
61
46
|
- lib/bioseqalign.rb
|
62
47
|
- lib/bioseqalign/version.rb
|
63
48
|
homepage: https://github.com/stefrb/bioseqalign
|
@@ -71,17 +56,17 @@ require_paths:
|
|
71
56
|
- ext
|
72
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
73
58
|
requirements:
|
74
|
-
- -
|
59
|
+
- - ">="
|
75
60
|
- !ruby/object:Gem::Version
|
76
61
|
version: '0'
|
77
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
63
|
requirements:
|
79
|
-
- -
|
64
|
+
- - ">="
|
80
65
|
- !ruby/object:Gem::Version
|
81
66
|
version: '0'
|
82
67
|
requirements: []
|
83
68
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
69
|
+
rubygems_version: 2.2.2
|
85
70
|
signing_key:
|
86
71
|
specification_version: 4
|
87
72
|
summary: Pairwise sequence alignment using seqan
|
@@ -1,42 +0,0 @@
|
|
1
|
-
#include "FitAlign.hpp"
|
2
|
-
|
3
|
-
FitAlign::FitAlign() {}
|
4
|
-
|
5
|
-
FitAlign::FitAlign(std::string s1, std::string s2) : PairwiseAlign(s1, s2) { }
|
6
|
-
|
7
|
-
// unable to figure out how to properly overload constructor using RICE
|
8
|
-
//FitAlign::FitAlign(std::string s1, std::string s2, int matchS, int mismatchS, int indelS) : PairwiseAlign(s1, s2, matchS, mismatchS, indelS) {}
|
9
|
-
|
10
|
-
std::string FitAlign::getAlignment() {
|
11
|
-
TSequence tseq1 = seq1;
|
12
|
-
TSequence tseq2 = seq2;
|
13
|
-
|
14
|
-
TStringSet sequences;
|
15
|
-
appendValue(sequences,tseq1);
|
16
|
-
appendValue(sequences,tseq2);
|
17
|
-
|
18
|
-
TAlignGraph alignG(sequences);
|
19
|
-
|
20
|
-
// don't penalize gaps on begin/end of seq2
|
21
|
-
globalAlignment(alignG, Score<int,Simple>(matchScore,mismatchScore,indelScore), AlignConfig<true, false, false, true>(), NeedlemanWunsch());
|
22
|
-
|
23
|
-
std::stringstream ss;
|
24
|
-
ss<<alignG;
|
25
|
-
return ss.str();
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
void FitAlign::run() {
|
30
|
-
TSequence tseq1 = seq1;
|
31
|
-
TSequence tseq2 = seq2;
|
32
|
-
|
33
|
-
TStringSet sequences;
|
34
|
-
appendValue(sequences,tseq1);
|
35
|
-
appendValue(sequences,tseq2);
|
36
|
-
|
37
|
-
TAlignGraph alignG(sequences);
|
38
|
-
|
39
|
-
// don't penalize gaps on begin/end of seq2
|
40
|
-
score = globalAlignment(alignG, Score<int,Simple>(matchScore,mismatchScore,indelScore), AlignConfig<true, false, false, true>(), NeedlemanWunsch());
|
41
|
-
|
42
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#include <iostream>
|
2
|
-
#include <string>
|
3
|
-
#include <seqan/align.h>
|
4
|
-
|
5
|
-
#include "PairwiseAlign.hpp"
|
6
|
-
|
7
|
-
using namespace seqan;
|
8
|
-
|
9
|
-
class FitAlign : public PairwiseAlign {
|
10
|
-
public:
|
11
|
-
FitAlign();
|
12
|
-
FitAlign(std::string s1, std::string s2);
|
13
|
-
//FitAlign(std::string s1, std::string s2, int matchS, int mismatchS, int indelS);
|
14
|
-
virtual ~FitAlign() {}
|
15
|
-
|
16
|
-
virtual void run();
|
17
|
-
virtual std::string getAlignment();
|
18
|
-
|
19
|
-
};
|
20
|
-
|
@@ -1,53 +0,0 @@
|
|
1
|
-
// global alignment
|
2
|
-
|
3
|
-
#include "GlobalAlign.hpp"
|
4
|
-
|
5
|
-
GlobalAlign::GlobalAlign() {}
|
6
|
-
|
7
|
-
GlobalAlign::GlobalAlign(std::string s1, std::string s2) : PairwiseAlign(s1, s2) { }
|
8
|
-
|
9
|
-
Rice::Array GlobalAlign::getAlignment() {
|
10
|
-
TAlign ali;
|
11
|
-
resize(rows(ali), 2);
|
12
|
-
assignSource(row(ali, 0), seq1);
|
13
|
-
assignSource(row(ali, 1), seq2);
|
14
|
-
|
15
|
-
//globalAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
16
|
-
globalAlignment(ali, Score<int>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
17
|
-
|
18
|
-
//std::cout<<row(ali, 0)<<std::endl;
|
19
|
-
//std::cout<<row(ali, 1)<<std::endl;
|
20
|
-
|
21
|
-
typedef Iterator<TRow>::Type TRowIterator;
|
22
|
-
TRowIterator it = begin(row(ali, 0));
|
23
|
-
TRowIterator itEnd = end(row(ali, 0));
|
24
|
-
std::string s_row1 = "";
|
25
|
-
for(; it != itEnd; ++it) {
|
26
|
-
if(isGap(it)) s_row1 += "-";
|
27
|
-
else s_row1 += (*it);
|
28
|
-
}
|
29
|
-
TRowIterator it2 = begin(row(ali, 1));
|
30
|
-
TRowIterator itEnd2 = end(row(ali, 1));
|
31
|
-
std::string s_row2 = "";
|
32
|
-
for(; it2 != itEnd2; ++it2) {
|
33
|
-
if(isGap(it2)) s_row2 += "-";
|
34
|
-
else s_row2 += (*it2);
|
35
|
-
}
|
36
|
-
|
37
|
-
// std::cout<<s_row1<<std::endl;
|
38
|
-
// std::cout<<s_row2<<std::endl;
|
39
|
-
// std::cout<<ali<<std::endl;
|
40
|
-
|
41
|
-
return getArrayFromAlignStr(s_row1+s_row2);
|
42
|
-
}
|
43
|
-
|
44
|
-
|
45
|
-
void GlobalAlign::run() {
|
46
|
-
TAlign ali;
|
47
|
-
resize(rows(ali), 2);
|
48
|
-
assignSource(row(ali, 0), seq1);
|
49
|
-
assignSource(row(ali, 1), seq2);
|
50
|
-
|
51
|
-
score = globalAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
52
|
-
}
|
53
|
-
|
@@ -1,53 +0,0 @@
|
|
1
|
-
// local alignment
|
2
|
-
|
3
|
-
#include "LocalAlign.hpp"
|
4
|
-
|
5
|
-
LocalAlign::LocalAlign() {}
|
6
|
-
|
7
|
-
LocalAlign::LocalAlign(std::string s1, std::string s2) : PairwiseAlign(s1, s2) { }
|
8
|
-
|
9
|
-
Rice::Array LocalAlign::getAlignment() {
|
10
|
-
TAlign ali;
|
11
|
-
resize(rows(ali), 2);
|
12
|
-
assignSource(row(ali, 0), seq1);
|
13
|
-
assignSource(row(ali, 1), seq2);
|
14
|
-
|
15
|
-
//localAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
16
|
-
localAlignment(ali, Score<int>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
17
|
-
|
18
|
-
//std::cout<<row(ali, 0)<<std::endl;
|
19
|
-
//std::cout<<row(ali, 1)<<std::endl;
|
20
|
-
|
21
|
-
typedef Iterator<TRow>::Type TRowIterator;
|
22
|
-
TRowIterator it = begin(row(ali, 0));
|
23
|
-
TRowIterator itEnd = end(row(ali, 0));
|
24
|
-
std::string s_row1 = "";
|
25
|
-
for(; it != itEnd; ++it) {
|
26
|
-
if(isGap(it)) s_row1 += "-";
|
27
|
-
else s_row1 += (*it);
|
28
|
-
}
|
29
|
-
TRowIterator it2 = begin(row(ali, 1));
|
30
|
-
TRowIterator itEnd2 = end(row(ali, 1));
|
31
|
-
std::string s_row2 = "";
|
32
|
-
for(; it2 != itEnd2; ++it2) {
|
33
|
-
if(isGap(it2)) s_row2 += "-";
|
34
|
-
else s_row2 += (*it2);
|
35
|
-
}
|
36
|
-
|
37
|
-
// std::cout<<s_row1<<std::endl;
|
38
|
-
// std::cout<<s_row2<<std::endl;
|
39
|
-
// std::cout<<ali<<std::endl;
|
40
|
-
|
41
|
-
return getArrayFromAlignStr(s_row1+s_row2);
|
42
|
-
}
|
43
|
-
|
44
|
-
|
45
|
-
void LocalAlign::run() {
|
46
|
-
TAlign ali;
|
47
|
-
resize(rows(ali), 2);
|
48
|
-
assignSource(row(ali, 0), seq1);
|
49
|
-
assignSource(row(ali, 1), seq2);
|
50
|
-
|
51
|
-
score = localAlignment(ali, Score<int,Simple>(matchScore,mismatchScore,indelScore), SmithWaterman());
|
52
|
-
}
|
53
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
// local alignment
|
@@ -1 +0,0 @@
|
|
1
|
-
// local alignment
|
data/ext/bioseqalign/Makefile
DELETED
@@ -1,314 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
# V=0 quiet, V=1 verbose. other values don't work.
|
5
|
-
V = 0
|
6
|
-
Q1 = $(V:1=)
|
7
|
-
Q = $(Q1:0=@)
|
8
|
-
ECHO1 = $(V:1=@:)
|
9
|
-
ECHO = $(ECHO1:0=@echo)
|
10
|
-
NULLCMD = :
|
11
|
-
|
12
|
-
#### Start of system configuration section. ####
|
13
|
-
|
14
|
-
srcdir = .
|
15
|
-
topdir = /home/stef/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0
|
16
|
-
hdrdir = $(topdir)
|
17
|
-
arch_hdrdir = /home/stef/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/x86_64-linux
|
18
|
-
PATH_SEPARATOR = :
|
19
|
-
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
20
|
-
|
21
|
-
prefix = $(DESTDIR)/home/stef/.rvm/rubies/ruby-2.2.0
|
22
|
-
|
23
|
-
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
24
|
-
|
25
|
-
rubyarchprefix = $(rubylibprefix)/$(arch)
|
26
|
-
|
27
|
-
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
28
|
-
|
29
|
-
exec_prefix = $(prefix)
|
30
|
-
|
31
|
-
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
32
|
-
|
33
|
-
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
34
|
-
|
35
|
-
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
36
|
-
|
37
|
-
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
38
|
-
|
39
|
-
sitehdrdir = $(rubyhdrdir)/site_ruby
|
40
|
-
|
41
|
-
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
42
|
-
|
43
|
-
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
44
|
-
|
45
|
-
vendorlibdir = $(vendordir)/$(ruby_version)
|
46
|
-
|
47
|
-
vendordir = $(rubylibprefix)/vendor_ruby
|
48
|
-
|
49
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
50
|
-
|
51
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
52
|
-
|
53
|
-
sitedir = $(rubylibprefix)/site_ruby
|
54
|
-
|
55
|
-
rubyarchdir = $(rubylibdir)/$(arch)
|
56
|
-
|
57
|
-
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
58
|
-
|
59
|
-
sitearchincludedir = $(includedir)/$(sitearch)
|
60
|
-
|
61
|
-
archincludedir = $(includedir)/$(arch)
|
62
|
-
|
63
|
-
sitearchlibdir = $(libdir)/$(sitearch)
|
64
|
-
|
65
|
-
archlibdir = $(libdir)/$(arch)
|
66
|
-
|
67
|
-
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
68
|
-
|
69
|
-
mandir = $(datarootdir)/man
|
70
|
-
|
71
|
-
localedir = $(datarootdir)/locale
|
72
|
-
|
73
|
-
libdir = $(exec_prefix)/lib
|
74
|
-
|
75
|
-
psdir = $(docdir)
|
76
|
-
|
77
|
-
pdfdir = $(docdir)
|
78
|
-
|
79
|
-
dvidir = $(docdir)
|
80
|
-
|
81
|
-
htmldir = $(docdir)
|
82
|
-
|
83
|
-
infodir = $(datarootdir)/info
|
84
|
-
|
85
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
86
|
-
|
87
|
-
oldincludedir = $(DESTDIR)/usr/include
|
88
|
-
|
89
|
-
includedir = $(prefix)/include
|
90
|
-
|
91
|
-
localstatedir = $(prefix)/var
|
92
|
-
|
93
|
-
sharedstatedir = $(prefix)/com
|
94
|
-
|
95
|
-
sysconfdir = $(DESTDIR)/etc
|
96
|
-
|
97
|
-
datadir = $(datarootdir)
|
98
|
-
|
99
|
-
datarootdir = $(prefix)/share
|
100
|
-
|
101
|
-
libexecdir = $(exec_prefix)/libexec
|
102
|
-
|
103
|
-
sbindir = $(exec_prefix)/sbin
|
104
|
-
|
105
|
-
bindir = $(exec_prefix)/bin
|
106
|
-
|
107
|
-
archdir = $(rubyarchdir)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
CC = gcc
|
112
|
-
CXX = g++
|
113
|
-
LIBRUBY = $(LIBRUBY_SO)
|
114
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
115
|
-
LIBRUBYARG_SHARED = -Wl,-rpath,'$${ORIGIN}/../lib' -Wl,-R'$${ORIGIN}/../lib' -l$(RUBY_SO_NAME)
|
116
|
-
LIBRUBYARG_STATIC = -Wl,-rpath,'${ORIGIN}/../lib' -Wl,-R'${ORIGIN}/../lib' -lruby-static
|
117
|
-
empty =
|
118
|
-
OUTFLAG = -o $(empty)
|
119
|
-
COUTFLAG = -o $(empty)
|
120
|
-
|
121
|
-
RUBY_EXTCONF_H =
|
122
|
-
cflags = $(optflags) $(debugflags) $(warnflags)
|
123
|
-
optflags = -O3 -fno-fast-math
|
124
|
-
debugflags = -ggdb3
|
125
|
-
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat
|
126
|
-
CCDLFLAGS = -fPIC
|
127
|
-
CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
|
128
|
-
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
129
|
-
DEFS =
|
130
|
-
CPPFLAGS = -I/home/stef/git_repos/tilapia/ext/seqan-1.3.1/ $(DEFS) $(cppflags) -I/home/stef/.rvm/gems/ruby-2.2.0/gems/rice-1.7.0/ruby/lib/include -std=c++11 -Wno-deprecated -Wno-unused-local-typedefs -Wimplicit-function-declaration -Wdeclaration-after-statement
|
131
|
-
CXXFLAGS = $(CFLAGS) -Wall -g
|
132
|
-
ldflags = -L. -fstack-protector -rdynamic -Wl,-export-dynamic -L/home/stef/.rvm/gems/ruby-2.2.0/gems/rice-1.7.0/ruby/lib/lib -lrice
|
133
|
-
dldflags =
|
134
|
-
ARCH_FLAG =
|
135
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
136
|
-
LDSHARED = g++ -shared
|
137
|
-
LDSHAREDXX = $(CXX) -shared
|
138
|
-
AR = ar
|
139
|
-
EXEEXT =
|
140
|
-
|
141
|
-
|
142
|
-
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
143
|
-
|
144
|
-
RUBY_SO_NAME = ruby
|
145
|
-
|
146
|
-
RUBYW_INSTALL_NAME =
|
147
|
-
|
148
|
-
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
149
|
-
|
150
|
-
RUBYW_BASE_NAME = rubyw
|
151
|
-
|
152
|
-
RUBY_BASE_NAME = ruby
|
153
|
-
|
154
|
-
|
155
|
-
arch = x86_64-linux
|
156
|
-
sitearch = $(arch)
|
157
|
-
ruby_version = 2.2.0
|
158
|
-
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
159
|
-
RUBY = $(ruby)
|
160
|
-
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
|
161
|
-
|
162
|
-
RM = rm -f
|
163
|
-
RM_RF = $(RUBY) -run -e rm -- -rf
|
164
|
-
RMDIRS = rmdir --ignore-fail-on-non-empty -p
|
165
|
-
MAKEDIRS = /bin/mkdir -p
|
166
|
-
INSTALL = /usr/bin/install
|
167
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
168
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
169
|
-
COPY = cp
|
170
|
-
TOUCH = exit >
|
171
|
-
|
172
|
-
#### End of system configuration section. ####
|
173
|
-
|
174
|
-
preload =
|
175
|
-
|
176
|
-
|
177
|
-
CXX = g++
|
178
|
-
|
179
|
-
libpath = . $(libdir)
|
180
|
-
LIBPATH = -L. -L$(libdir) -Wl,-R$(libdir)
|
181
|
-
DEFFILE =
|
182
|
-
|
183
|
-
CLEANFILES = mkmf.log
|
184
|
-
DISTCLEANFILES =
|
185
|
-
DISTCLEANDIRS =
|
186
|
-
|
187
|
-
extout =
|
188
|
-
extout_prefix =
|
189
|
-
target_prefix =
|
190
|
-
LOCAL_LIBS =
|
191
|
-
LIBS = -Wl,-rpath,'${ORIGIN}/../lib' -Wl,-R'${ORIGIN}/../lib' -lruby -lpthread -ldl -lcrypt -lm -lc
|
192
|
-
ORIG_SRCS = PrefixSuffixAlign.cpp PairwiseAlign.cpp LocalAlign.cpp fitalgntest.cpp GlobalAlign.cpp FitAlign.cpp
|
193
|
-
SRCS = $(ORIG_SRCS)
|
194
|
-
OBJS = PrefixSuffixAlign.o PairwiseAlign.o LocalAlign.o fitalgntest.o GlobalAlign.o FitAlign.o
|
195
|
-
HDRS = $(srcdir)/FitAlign.hpp $(srcdir)/GlobalAlign.hpp $(srcdir)/PrefixSuffixAlign.hpp $(srcdir)/LocalAlign.hpp $(srcdir)/PairwiseAlign.hpp
|
196
|
-
TARGET = SeqAlign
|
197
|
-
TARGET_NAME = SeqAlign
|
198
|
-
TARGET_ENTRY = Init_$(TARGET_NAME)
|
199
|
-
DLLIB = $(TARGET).so
|
200
|
-
EXTSTATIC =
|
201
|
-
STATIC_LIB =
|
202
|
-
|
203
|
-
TIMESTAMP_DIR = .
|
204
|
-
BINDIR = $(bindir)
|
205
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
206
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
207
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
208
|
-
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
209
|
-
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
210
|
-
|
211
|
-
TARGET_SO = $(DLLIB)
|
212
|
-
CLEANLIBS = $(TARGET).so
|
213
|
-
CLEANOBJS = *.o *.bak
|
214
|
-
|
215
|
-
all: $(DLLIB)
|
216
|
-
static: $(STATIC_LIB)
|
217
|
-
.PHONY: all install static install-so install-rb
|
218
|
-
.PHONY: clean clean-so clean-static clean-rb
|
219
|
-
|
220
|
-
clean-static::
|
221
|
-
clean-rb-default::
|
222
|
-
clean-rb::
|
223
|
-
clean-so::
|
224
|
-
clean: clean-so clean-static clean-rb-default clean-rb
|
225
|
-
-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
226
|
-
|
227
|
-
distclean-rb-default::
|
228
|
-
distclean-rb::
|
229
|
-
distclean-so::
|
230
|
-
distclean-static::
|
231
|
-
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
232
|
-
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
233
|
-
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
234
|
-
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
235
|
-
|
236
|
-
realclean: distclean
|
237
|
-
install: install-so install-rb
|
238
|
-
|
239
|
-
install-so: $(DLLIB) $(TIMESTAMP_DIR)/.RUBYARCHDIR.time
|
240
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
241
|
-
clean-static::
|
242
|
-
-$(Q)$(RM) $(STATIC_LIB)
|
243
|
-
install-rb: pre-install-rb install-rb-default
|
244
|
-
install-rb-default: pre-install-rb-default
|
245
|
-
pre-install-rb: Makefile
|
246
|
-
pre-install-rb-default: Makefile
|
247
|
-
pre-install-rb-default:
|
248
|
-
@$(NULLCMD)
|
249
|
-
$(TIMESTAMP_DIR)/.RUBYARCHDIR.time:
|
250
|
-
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
251
|
-
$(Q) $(TOUCH) $@
|
252
|
-
|
253
|
-
site-install: site-install-so site-install-rb
|
254
|
-
site-install-so: install-so
|
255
|
-
site-install-rb: install-rb
|
256
|
-
|
257
|
-
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
258
|
-
|
259
|
-
.cc.o:
|
260
|
-
$(ECHO) compiling $(<)
|
261
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
262
|
-
|
263
|
-
.cc.S:
|
264
|
-
$(ECHO) translating $(<)
|
265
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $<
|
266
|
-
|
267
|
-
.mm.o:
|
268
|
-
$(ECHO) compiling $(<)
|
269
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
270
|
-
|
271
|
-
.mm.S:
|
272
|
-
$(ECHO) translating $(<)
|
273
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $<
|
274
|
-
|
275
|
-
.cxx.o:
|
276
|
-
$(ECHO) compiling $(<)
|
277
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
278
|
-
|
279
|
-
.cxx.S:
|
280
|
-
$(ECHO) translating $(<)
|
281
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $<
|
282
|
-
|
283
|
-
.cpp.o:
|
284
|
-
$(ECHO) compiling $(<)
|
285
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
286
|
-
|
287
|
-
.cpp.S:
|
288
|
-
$(ECHO) translating $(<)
|
289
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $<
|
290
|
-
|
291
|
-
.c.o:
|
292
|
-
$(ECHO) compiling $(<)
|
293
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
294
|
-
|
295
|
-
.c.S:
|
296
|
-
$(ECHO) translating $(<)
|
297
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $<
|
298
|
-
|
299
|
-
.m.o:
|
300
|
-
$(ECHO) compiling $(<)
|
301
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
302
|
-
|
303
|
-
.m.S:
|
304
|
-
$(ECHO) translating $(<)
|
305
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $<
|
306
|
-
|
307
|
-
$(DLLIB): $(OBJS) Makefile
|
308
|
-
$(ECHO) linking shared-object $(DLLIB)
|
309
|
-
-$(Q)$(RM) $(@)
|
310
|
-
$(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
$(OBJS): $(HDRS) $(ruby_headers)
|
@@ -1,23 +0,0 @@
|
|
1
|
-
#include "PairwiseAlign.hpp"
|
2
|
-
|
3
|
-
PairwiseAlign::PairwiseAlign() {}
|
4
|
-
|
5
|
-
PairwiseAlign::PairwiseAlign(std::string s1, std::string s2) {
|
6
|
-
seq1 = s1;
|
7
|
-
seq2 = s2;
|
8
|
-
score = -10000;
|
9
|
-
matchScore = 1;
|
10
|
-
mismatchScore = -1;
|
11
|
-
indelScore = -1;
|
12
|
-
}
|
13
|
-
|
14
|
-
// unable to properly figure out how to overload constructor when using RICE
|
15
|
-
// PairwiseAlign::PairwiseAlign(std::string s1, std::string s2, int matchS, int mismatchS, int indelS) {
|
16
|
-
// seq1 = s1;
|
17
|
-
// seq2 = s2;
|
18
|
-
// score = -10000;
|
19
|
-
// matchScore = matchS;
|
20
|
-
// mismatchScore = mismatchS;
|
21
|
-
// indelScore = indelS;
|
22
|
-
// }
|
23
|
-
|
@@ -1,54 +0,0 @@
|
|
1
|
-
#ifndef PAIRWISE_ALIGN_HPP
|
2
|
-
#define PAIRWISE_ALIGN_HPP
|
3
|
-
|
4
|
-
#include <iostream>
|
5
|
-
#include <string>
|
6
|
-
#include <seqan/align.h>
|
7
|
-
|
8
|
-
#include "rice/String.hpp"
|
9
|
-
#include "rice/Array.hpp"
|
10
|
-
|
11
|
-
using namespace seqan;
|
12
|
-
|
13
|
-
typedef String<char> TSequence; // sequence type
|
14
|
-
typedef StringSet<TSequence> TStringSet; // container for strings
|
15
|
-
typedef StringSet<TSequence, Dependent<> > TDepStringSet; // dependent string set
|
16
|
-
typedef Graph<Alignment<TDepStringSet> > TAlignGraph; // alignment graph
|
17
|
-
|
18
|
-
typedef Align<TSequence,ArrayGaps> TAlign;
|
19
|
-
typedef Row<TAlign>::Type TRow;
|
20
|
-
|
21
|
-
class PairwiseAlign {
|
22
|
-
protected:
|
23
|
-
std::string seq1;
|
24
|
-
std::string seq2;
|
25
|
-
int score;
|
26
|
-
TAlignGraph alignG;
|
27
|
-
int matchScore;
|
28
|
-
int mismatchScore;
|
29
|
-
int indelScore;
|
30
|
-
// return a ruby array of the alignment matrix string
|
31
|
-
Rice::Array getArrayFromAlignStr(std::string alignMat);
|
32
|
-
|
33
|
-
public:
|
34
|
-
PairwiseAlign();
|
35
|
-
PairwiseAlign(std::string s1, std::string s2);
|
36
|
-
//PairwiseAlign(std::string s1, std::string s2, int matchS, int mismatchS, int indelS);
|
37
|
-
virtual ~PairwiseAlign() {}
|
38
|
-
|
39
|
-
virtual void run() {}
|
40
|
-
int getAlignScore() { return score; }
|
41
|
-
//virtual std::string getAlignment() { return ""; }
|
42
|
-
virtual Rice::Array getAlignment() { Rice::Array tmp; return tmp; }
|
43
|
-
|
44
|
-
void setMatchScore(int mS) { matchScore = mS; }
|
45
|
-
void setMismatchScore(int mS) { mismatchScore = mS; }
|
46
|
-
void setIndelScore(int idS) { indelScore = idS; }
|
47
|
-
|
48
|
-
std::string getSeq1() { return seq1; }
|
49
|
-
std::string getSeq2() { return seq2; }
|
50
|
-
|
51
|
-
};
|
52
|
-
|
53
|
-
|
54
|
-
#endif
|
@@ -1,42 +0,0 @@
|
|
1
|
-
#include "PrefixSuffixAlign.hpp"
|
2
|
-
|
3
|
-
PrefixSuffixAlign::PrefixSuffixAlign() {}
|
4
|
-
|
5
|
-
PrefixSuffixAlign::PrefixSuffixAlign(std::string s1, std::string s2) : PairwiseAlign(s1, s2) { }
|
6
|
-
|
7
|
-
// unable to figure out how to properly overload constructor using RICE
|
8
|
-
//PrefixSuffixAlign::PrefixSuffixAlign(std::string s1, std::string s2, int matchS, int mismatchS, int indelS) : PairwiseAlign(s1, s2, matchS, mismatchS, indelS) {}
|
9
|
-
|
10
|
-
std::string PrefixSuffixAlign::getAlignment() {
|
11
|
-
TSequence tseq1 = seq1;
|
12
|
-
TSequence tseq2 = seq2;
|
13
|
-
|
14
|
-
TStringSet sequences;
|
15
|
-
appendValue(sequences,tseq1);
|
16
|
-
appendValue(sequences,tseq2);
|
17
|
-
|
18
|
-
TAlignGraph alignG(sequences);
|
19
|
-
|
20
|
-
// don't penalize gaps on begin/end of seq2
|
21
|
-
globalAlignment(alignG, Score<int,Simple>(matchScore,mismatchScore,indelScore), AlignConfig<true, false, false, true>(), NeedlemanWunsch());
|
22
|
-
|
23
|
-
std::stringstream ss;
|
24
|
-
ss<<alignG;
|
25
|
-
return ss.str();
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
void PrefixSuffixAlign::run() {
|
30
|
-
TSequence tseq1 = seq1;
|
31
|
-
TSequence tseq2 = seq2;
|
32
|
-
|
33
|
-
TStringSet sequences;
|
34
|
-
appendValue(sequences,tseq1);
|
35
|
-
appendValue(sequences,tseq2);
|
36
|
-
|
37
|
-
TAlignGraph alignG(sequences);
|
38
|
-
|
39
|
-
// don't penalize gaps on begin/end of seq2
|
40
|
-
score = globalAlignment(alignG, Score<int,Simple>(matchScore,mismatchScore,indelScore), AlignConfig<true, false, false, true>(), NeedlemanWunsch());
|
41
|
-
|
42
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#include <iostream>
|
2
|
-
#include <string>
|
3
|
-
#include <seqan/align.h>
|
4
|
-
|
5
|
-
#include "PairwiseAlign.hpp"
|
6
|
-
|
7
|
-
using namespace seqan;
|
8
|
-
|
9
|
-
class PrefixSuffixAlign : public PairwiseAlign {
|
10
|
-
public:
|
11
|
-
FitAlign();
|
12
|
-
FitAlign(std::string s1, std::string s2);
|
13
|
-
//FitAlign(std::string s1, std::string s2, int matchS, int mismatchS, int indelS);
|
14
|
-
virtual ~FitAlign() {}
|
15
|
-
|
16
|
-
virtual void run();
|
17
|
-
virtual std::string getAlignment();
|
18
|
-
|
19
|
-
};
|
20
|
-
|
data/ext/bioseqalign/extconf.rb~
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
#include "rice/Data_Type.hpp"
|
2
|
-
#include "rice/Constructor.hpp"
|
3
|
-
//#include "PairwiseAlign.hpp"
|
4
|
-
#include "FitAlign.hpp"
|
5
|
-
#include "PrefixSuffixAlign.hpp"
|
6
|
-
using namespace Rice;
|
7
|
-
|
8
|
-
extern "C"
|
9
|
-
|
10
|
-
//void Init_FitAlign()
|
11
|
-
void Init_SeqAlign()
|
12
|
-
{
|
13
|
-
Data_Type<PairwiseAlign> rb_cPairwiseAlign = define_class<PairwiseAlign>("PairwiseAlign")
|
14
|
-
.define_constructor(Constructor<PairwiseAlign>())
|
15
|
-
.define_constructor(Constructor<PairwiseAlign,std::string,std::string>())
|
16
|
-
//.define_constructor(Constructor<PairwiseAlign,std::string,std::string,int,int,int>())
|
17
|
-
.define_method("getAlignScore", &PairwiseAlign::getAlignScore)
|
18
|
-
.define_method("getSeq1", &PairwiseAlign::getSeq1)
|
19
|
-
.define_method("getSeq2", &PairwiseAlign::getSeq2)
|
20
|
-
.define_method("run", &PairwiseAlign::run)
|
21
|
-
.define_method("getAlignment", &PairwiseAlign::getAlignment)
|
22
|
-
.define_method("setMatchScore", &PairwiseAlign::setMatchScore)
|
23
|
-
.define_method("setMismatchScore", &PairwiseAlign::setMismatchScore)
|
24
|
-
.define_method("setIndelScore", &PairwiseAlign::setIndelScore);
|
25
|
-
Data_Type<FitAlign> rb_cFitAlign = define_class<FitAlign,PairwiseAlign>("FitAlign")
|
26
|
-
.define_constructor(Constructor<FitAlign>())
|
27
|
-
.define_constructor(Constructor<FitAlign,std::string,std::string>())
|
28
|
-
//.define_constructor(Constructor<FitAlign,std::string,std::string,int,int,int>())
|
29
|
-
.define_method("run", &FitAlign::run)
|
30
|
-
.define_method("getAlignment", &FitAlign::getAlignment);
|
31
|
-
Data_Type<PrefixSuffixAlign> rb_cPrefixSuffixAlign = define_class<PrefixSuffixAlign,PairwiseAlign>("PrefixSuffixAlign")
|
32
|
-
.define_constructor(Constructor<PrefixSuffixAlign>())
|
33
|
-
.define_constructor(Constructor<PrefixSuffixAlign,std::string,std::string>())
|
34
|
-
.define_method("run", &PrefixSuffixAlign::run)
|
35
|
-
.define_method("getAlignment", &PrefixSuffixAlign::getAlignment);
|
36
|
-
//.define_method("getAlignmentArray", &PrefixSuffixAlign::getAlignmentArray);
|
37
|
-
}
|
data/ext/bioseqalign/runTest.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require './SeqAlign'
|
2
|
-
|
3
|
-
|
4
|
-
module BSA
|
5
|
-
|
6
|
-
include SeqAlign
|
7
|
-
|
8
|
-
end
|
9
|
-
|
10
|
-
fa = BSA::FitAlign.new("AAAACCCAAA", "CCC")
|
11
|
-
fa.run
|
12
|
-
puts fa.getAlignScore
|
13
|
-
|
14
|
-
#fa = SeqAlign::FitAlign.new("AAAACCCAAA", "CCC")
|
15
|
-
#puts fa
|
16
|
-
#fa = BSA::FitAlign.new("AAAACCCAAA", "CCC")
|
17
|
-
|
18
|
-
|
19
|
-
Process.exit(0)
|
20
|
-
|
21
|
-
require './SeqAlign'
|
22
|
-
|
23
|
-
sa = PairwiseAlign.new("TCGA", "TCGA")
|
24
|
-
puts sa.getSeq1
|
25
|
-
|
26
|
-
#__END__
|
27
|
-
fa = FitAlign.new("AAAAAAAATCGAGGG", "TCGA")
|
28
|
-
fa.setMatchScore(2)
|
29
|
-
fa.setMismatchScore(-1)
|
30
|
-
fa.setIndelScore(-1)
|
31
|
-
puts fa.getSeq1
|
32
|
-
fa.run
|
33
|
-
puts fa.getAlignScore
|
34
|
-
puts fa.getAlignment
|
35
|
-
|