bioseqalign 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/bioseqalign/FitAlign.cpp +48 -0
- data/ext/bioseqalign/FitAlign.cpp~ +42 -0
- data/ext/bioseqalign/FitAlign.hpp +22 -0
- data/ext/bioseqalign/FitAlign.hpp~ +20 -0
- data/ext/bioseqalign/GlobalAlign.cpp +45 -0
- data/ext/bioseqalign/GlobalAlign.cpp~ +53 -0
- data/ext/bioseqalign/GlobalAlign.hpp +20 -0
- data/ext/bioseqalign/GlobalAlign.hpp~ +53 -0
- data/ext/bioseqalign/LocalAlign.cpp +53 -0
- data/ext/bioseqalign/LocalAlign.cpp~ +1 -0
- data/ext/bioseqalign/LocalAlign.hpp +21 -0
- data/ext/bioseqalign/LocalAlign.hpp~ +1 -0
- data/ext/bioseqalign/Makefile +251 -0
- data/ext/bioseqalign/PairwiseAlign.cpp +33 -0
- data/ext/bioseqalign/PairwiseAlign.cpp~ +23 -0
- data/ext/bioseqalign/PairwiseAlign.hpp +54 -0
- data/ext/bioseqalign/PairwiseAlign.hpp~ +54 -0
- data/ext/bioseqalign/PrefixSuffixAlign.cpp +52 -0
- data/ext/bioseqalign/PrefixSuffixAlign.cpp~ +42 -0
- data/ext/bioseqalign/PrefixSuffixAlign.hpp +30 -0
- data/ext/bioseqalign/PrefixSuffixAlign.hpp~ +20 -0
- data/ext/bioseqalign/extconf.rb +2 -0
- data/ext/bioseqalign/extconf.rb~ +2 -0
- data/ext/bioseqalign/fitalgntest.cpp +49 -0
- data/ext/bioseqalign/fitalgntest.cpp~ +37 -0
- data/ext/bioseqalign/runTest.rb +17 -0
- data/ext/bioseqalign/runTest.rb~ +8 -0
- data/lib/bioseqalign.rb +151 -0
- metadata +91 -0
@@ -0,0 +1,33 @@
|
|
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
|
+
|
24
|
+
/**
|
25
|
+
* given an alignment matrix string, split into two, and put in ruby array
|
26
|
+
*/
|
27
|
+
Rice::Array PairwiseAlign::getArrayFromAlignStr(std::string alignMat) {
|
28
|
+
Rice::Array tmp;
|
29
|
+
int halfLen = alignMat.size()/2;
|
30
|
+
tmp.push(alignMat.substr(0, halfLen));
|
31
|
+
tmp.push(alignMat.substr(halfLen, halfLen));
|
32
|
+
return tmp;
|
33
|
+
}
|
@@ -0,0 +1,23 @@
|
|
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
|
+
|
@@ -0,0 +1,54 @@
|
|
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
|
@@ -0,0 +1,54 @@
|
|
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
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#include "PrefixSuffixAlign.hpp"
|
2
|
+
|
3
|
+
PrefixSuffixAlign::PrefixSuffixAlign() {}
|
4
|
+
|
5
|
+
PrefixSuffixAlign::PrefixSuffixAlign(std::string s1, std::string s2) : PairwiseAlign(s1, s2) { }
|
6
|
+
|
7
|
+
//std::string PrefixSuffixAlign::getAlignment() {
|
8
|
+
//Rice::Array PrefixSuffixAlign::getAlignmentArray() {
|
9
|
+
Rice::Array PrefixSuffixAlign::getAlignment() {
|
10
|
+
TSequence tseq1 = seq1;
|
11
|
+
TSequence tseq2 = seq2;
|
12
|
+
|
13
|
+
TStringSet sequences;
|
14
|
+
appendValue(sequences,tseq1);
|
15
|
+
appendValue(sequences,tseq2);
|
16
|
+
|
17
|
+
TAlignGraph alignG(sequences);
|
18
|
+
|
19
|
+
// don't penalize gaps on begin/end of seq2
|
20
|
+
globalAlignment(alignG, Score<int,Simple>(matchScore,mismatchScore,indelScore), AlignConfig<false, true, false, true>(), NeedlemanWunsch());
|
21
|
+
|
22
|
+
|
23
|
+
std::string mat;
|
24
|
+
convertAlignment(alignG, mat);
|
25
|
+
//std::cout<<alignG<<std::endl;
|
26
|
+
//std::cout<<mat<<std::endl;
|
27
|
+
return getArrayFromAlignStr(mat);
|
28
|
+
/*
|
29
|
+
Rice::Array tmp;
|
30
|
+
int halfLen = mat.size()/2;
|
31
|
+
tmp.push(mat.substr(0, halfLen));
|
32
|
+
tmp.push(mat.substr(halfLen+1, halfLen));
|
33
|
+
return tmp;
|
34
|
+
*/
|
35
|
+
//return mat;
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
void PrefixSuffixAlign::run() {
|
40
|
+
TSequence tseq1 = seq1;
|
41
|
+
TSequence tseq2 = seq2;
|
42
|
+
|
43
|
+
TStringSet sequences;
|
44
|
+
appendValue(sequences,tseq1);
|
45
|
+
appendValue(sequences,tseq2);
|
46
|
+
|
47
|
+
TAlignGraph alignG(sequences);
|
48
|
+
|
49
|
+
// don't penalize gaps on begin/end of seq2
|
50
|
+
score = globalAlignment(alignG, Score<int,Simple>(matchScore,mismatchScore,indelScore), AlignConfig<false, true, false, true>(), NeedlemanWunsch());
|
51
|
+
|
52
|
+
}
|
@@ -0,0 +1,42 @@
|
|
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
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* Perform prefix-suffix alignment, aligning the prefix of seq1
|
3
|
+
* with the suffix of seq2
|
4
|
+
* ex: seq1: --------YYYYYYYZZZZZZ
|
5
|
+
* seq2: XXXXXXXXYYYYYYY------
|
6
|
+
*/
|
7
|
+
|
8
|
+
#include <iostream>
|
9
|
+
#include <string>
|
10
|
+
#include <seqan/align.h>
|
11
|
+
|
12
|
+
#include "PairwiseAlign.hpp"
|
13
|
+
|
14
|
+
using namespace seqan;
|
15
|
+
|
16
|
+
|
17
|
+
class PrefixSuffixAlign : public PairwiseAlign {
|
18
|
+
public:
|
19
|
+
PrefixSuffixAlign();
|
20
|
+
PrefixSuffixAlign(std::string s1, std::string s2);
|
21
|
+
virtual ~PrefixSuffixAlign() {}
|
22
|
+
|
23
|
+
virtual void run();
|
24
|
+
//virtual std::string getAlignment();
|
25
|
+
//Rice::Array getAlignmentArray();
|
26
|
+
virtual Rice::Array getAlignment();
|
27
|
+
|
28
|
+
};
|
29
|
+
|
30
|
+
|
@@ -0,0 +1,20 @@
|
|
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
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
#include "rice/Data_Type.hpp"
|
2
|
+
#include "rice/Constructor.hpp"
|
3
|
+
//#include "PairwiseAlign.hpp"
|
4
|
+
#include "FitAlign.hpp"
|
5
|
+
#include "PrefixSuffixAlign.hpp"
|
6
|
+
#include "LocalAlign.hpp"
|
7
|
+
#include "GlobalAlign.hpp"
|
8
|
+
|
9
|
+
using namespace Rice;
|
10
|
+
|
11
|
+
extern "C"
|
12
|
+
|
13
|
+
//void Init_FitAlign()
|
14
|
+
void Init_SeqAlign()
|
15
|
+
{
|
16
|
+
Data_Type<PairwiseAlign> rb_cPairwiseAlign = define_class<PairwiseAlign>("PairwiseAlign")
|
17
|
+
.define_constructor(Constructor<PairwiseAlign>())
|
18
|
+
.define_constructor(Constructor<PairwiseAlign,std::string,std::string>())
|
19
|
+
//.define_constructor(Constructor<PairwiseAlign,std::string,std::string,int,int,int>())
|
20
|
+
.define_method("getAlignScore", &PairwiseAlign::getAlignScore)
|
21
|
+
.define_method("getSeq1", &PairwiseAlign::getSeq1)
|
22
|
+
.define_method("getSeq2", &PairwiseAlign::getSeq2)
|
23
|
+
.define_method("run", &PairwiseAlign::run)
|
24
|
+
.define_method("getAlignment", &PairwiseAlign::getAlignment)
|
25
|
+
.define_method("setMatchScore", &PairwiseAlign::setMatchScore)
|
26
|
+
.define_method("setMismatchScore", &PairwiseAlign::setMismatchScore)
|
27
|
+
.define_method("setIndelScore", &PairwiseAlign::setIndelScore);
|
28
|
+
Data_Type<FitAlign> rb_cFitAlign = define_class<FitAlign,PairwiseAlign>("FitAlign")
|
29
|
+
.define_constructor(Constructor<FitAlign>())
|
30
|
+
.define_constructor(Constructor<FitAlign,std::string,std::string>())
|
31
|
+
//.define_constructor(Constructor<FitAlign,std::string,std::string,int,int,int>())
|
32
|
+
.define_method("run", &FitAlign::run)
|
33
|
+
.define_method("getAlignment", &FitAlign::getAlignment);
|
34
|
+
Data_Type<PrefixSuffixAlign> rb_cPrefixSuffixAlign = define_class<PrefixSuffixAlign,PairwiseAlign>("PrefixSuffixAlign")
|
35
|
+
.define_constructor(Constructor<PrefixSuffixAlign>())
|
36
|
+
.define_constructor(Constructor<PrefixSuffixAlign,std::string,std::string>())
|
37
|
+
.define_method("run", &PrefixSuffixAlign::run)
|
38
|
+
.define_method("getAlignment", &PrefixSuffixAlign::getAlignment);
|
39
|
+
Data_Type<LocalAlign> rb_cLocalAlign = define_class<LocalAlign,PairwiseAlign>("LocalAlign")
|
40
|
+
.define_constructor(Constructor<LocalAlign>())
|
41
|
+
.define_constructor(Constructor<LocalAlign,std::string,std::string>())
|
42
|
+
.define_method("run", &LocalAlign::run)
|
43
|
+
.define_method("getAlignment", &LocalAlign::getAlignment);
|
44
|
+
Data_Type<GlobalAlign> rb_cGlobalAlign = define_class<GlobalAlign,PairwiseAlign>("GlobalAlign")
|
45
|
+
.define_constructor(Constructor<GlobalAlign>())
|
46
|
+
.define_constructor(Constructor<GlobalAlign,std::string,std::string>())
|
47
|
+
.define_method("run", &GlobalAlign::run)
|
48
|
+
.define_method("getAlignment", &GlobalAlign::getAlignment);
|
49
|
+
}
|
@@ -0,0 +1,37 @@
|
|
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
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#require './PairwiseAlign'
|
2
|
+
#require './FitAlign'
|
3
|
+
require './SeqAlign'
|
4
|
+
|
5
|
+
sa = PairwiseAlign.new("TCGA", "TCGA")
|
6
|
+
puts sa.getSeq1
|
7
|
+
|
8
|
+
#__END__
|
9
|
+
fa = FitAlign.new("AAAAAAAATCGAGGG", "TCGA")
|
10
|
+
fa.setMatchScore(2)
|
11
|
+
fa.setMismatchScore(-1)
|
12
|
+
fa.setIndelScore(-1)
|
13
|
+
puts fa.getSeq1
|
14
|
+
fa.run
|
15
|
+
puts fa.getAlignScore
|
16
|
+
puts fa.getAlignment
|
17
|
+
|