Permalink
Browse files

This commit was manufactured by cvs2svn to create branch

'bioperl-ext-branch-1-5-1'.

svn path=/bioperl-ext/branches/bioperl-ext-branch-1-5-1/; revision=658
  • Loading branch information...
1 parent cab3ef9 commit 8695d5b2014b91e934c4550ae222196bcb202091 nobody committed Sep 26, 2005
View
@@ -10,7 +10,7 @@ extern "C" {
#endif
#include "sw.h"
-
+#include "dpalign.h"
static int
not_here(s)
@@ -3307,7 +3307,225 @@ Align_Proteins_SmithWaterman(one,two,comp,gap,ext)
OUTPUT:
RETVAL
+MODULE = Bio::Ext::Align PACKAGE = Bio::Ext::Align
+
+dpAlign_AlignOutput *
+Align_DNA_Sequences(seq1, seq2, match, mismatch, gap, ext, alg)
+ char * seq1
+ char * seq2
+ int match
+ int mismatch
+ int gap
+ int ext
+ int alg
+ CODE:
+ switch (alg) {
+ case 1:
+ RETVAL = dpAlign_Local_DNA_MillerMyers(seq1, seq2, match, mismatch, gap, ext);
+ break;
+ case 2:
+ RETVAL = dpAlign_Global_DNA_MillerMyers(seq1, seq2, match, mismatch, gap, ext);
+ break;
+ default:
+ RETVAL = dpAlign_Local_DNA_MillerMyers(seq1, seq2, match, mismatch, gap, ext);
+ break;
+ }
+ OUTPUT:
+ RETVAL
+
+dpAlign_AlignOutput *
+Align_Protein_Sequences(seq1, seq2, matrix, alg)
+ char * seq1
+ char * seq2
+ dpAlign_ScoringMatrix * matrix
+ int alg
+ CODE:
+ switch (alg) {
+ case 1:
+ RETVAL = dpAlign_Local_Protein_MillerMyers(seq1, seq2, matrix);
+ break;
+ case 2:
+ RETVAL = dpAlign_Global_Protein_MillerMyers(seq1, seq2, matrix);
+ break;
+ default:
+ RETVAL = dpAlign_Local_Protein_MillerMyers(seq1, seq2, matrix);
+ break;
+ }
+ OUTPUT:
+ RETVAL
+
+int
+Score_DNA_Sequences(sp, seq2)
+ dpAlign_SequenceProfile * sp
+ char * seq2
+ CODE:
+ RETVAL = dpAlign_Local_DNA_PhilGreen(sp, seq2);
+ ST(0) = sv_newmortal();
+ sv_setiv(ST(0), (IV)RETVAL);
+ XSRETURN(1);
+
+int
+Score_Protein_Sequences(sp, seq2)
+ dpAlign_SequenceProfile * sp
+ char * seq2
+ CODE:
+ RETVAL = dpAlign_Local_Protein_PhilGreen(sp, seq2);
+ ST(0) = sv_newmortal();
+ sv_setiv(ST(0), (IV)RETVAL);
+ XSRETURN(1);
+
+MODULE = Bio::Ext::Align PACKAGE = Bio::Ext::Align::ScoringMatrix
+
+dpAlign_ScoringMatrix *
+new(class, alphabet, gap, ext)
+ char * class
+ char * alphabet
+ int gap
+ int ext
+ PPCODE:
+ dpAlign_ScoringMatrix * out;
+ out = new_dpAlign_ScoringMatrix(alphabet, gap, ext);
+ ST(0) = sv_newmortal();
+ sv_setref_pv(ST(0), class, (void *) out);
+ XSRETURN(1);
+
+void
+set_entry(class, matrix, row, col, val)
+ char * class
+ dpAlign_ScoringMatrix * matrix
+ char * row
+ char * col
+ int val
+ PPCODE:
+ set_dpAlign_ScoringMatrix(matrix, row, col, val);
+ XSRETURN(1);
+
+void
+DESTROY(obj)
+ dpAlign_ScoringMatrix * obj
+ PPCODE:
+ int i;
+ for (i = 0; i < obj->sz; ++i)
+ free(obj->s[i]);
+ free(obj->s);
+
+MODULE = Bio::Ext::Align PACKAGE = Bio::Ext::Align::SequenceProfile
+
+dpAlign_SequenceProfile *
+dna_new(class, seq1, match, mismatch, gap, ext)
+ char * class
+ char * seq1
+ int match
+ int mismatch
+ int gap
+ int ext
+ PPCODE:
+ dpAlign_SequenceProfile * out;
+ out = dpAlign_DNA_Profile(seq1, match, mismatch, gap, ext);
+ ST(0) = sv_newmortal();
+ sv_setref_pv(ST(0), class, (void *) out);
+ XSRETURN(1);
+
+dpAlign_SequenceProfile *
+protein_new(class, seq1, matrix)
+ char * class
+ char * seq1
+ dpAlign_ScoringMatrix * matrix
+ PPCODE:
+ dpAlign_SequenceProfile * out;
+ out = dpAlign_Protein_Profile(seq1, matrix);
+ ST(0) = sv_newmortal();
+ sv_setref_pv(ST(0), class, (void *) out);
+ XSRETURN(1);
+
+char *
+alphabet(obj)
+ dpAlign_SequenceProfile * obj
+ CODE:
+ switch (obj->type) {
+ case 1:
+ RETVAL = "dna";
+ break;
+ case 2:
+ RETVAL = "protein";
+ break;
+ case 3:
+ RETVAL = "rna";
+ break;
+ default:
+ RETVAL = "unknown";
+ }
+ OUTPUT:
+ RETVAL
+
+void
+DESTROY(obj)
+ dpAlign_SequenceProfile * obj
+ CODE:
+ free(obj->waa);
+
+MODULE = Bio::Ext::Align PACKAGE = Bio::Ext::Align::AlignOutput
+char *
+aln1(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->aln1;
+ OUTPUT:
+ RETVAL
+char *
+aln2(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->aln2;
+ OUTPUT:
+ RETVAL
+int
+start1(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->start1;
+ OUTPUT:
+ RETVAL
+
+int
+end1(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->end1;
+ OUTPUT:
+ RETVAL
+
+int
+start2(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->start2;
+ OUTPUT:
+ RETVAL
+
+int
+end2(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->end2;
+ OUTPUT:
+ RETVAL
+
+int
+score(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ RETVAL = obj->score;
+ OUTPUT:
+ RETVAL
+
+void
+DESTROY(obj)
+ dpAlign_AlignOutput * obj
+ CODE:
+ free(obj->aln1);
+ free(obj->aln2);
@@ -3,7 +3,7 @@ use ExtUtils::MakeMaker;
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Bio::Ext::Align',
- 'VERSION' => '0.1',
+ 'VERSION' => '1.5.1',
'LIBS' => ['-lm'], # e.g., '-lm'
'DEFINE' => '-DPOSIX -DNOERROR', # e.g., '-DHAVE_SOMETHING'
'INC' => '-I./libs', # e.g., '-I/usr/include/other'
@@ -14,8 +14,8 @@ WriteMakefile(
sub MY::postamble{
'
$(MYEXTLIB):
- DEFINE=\'$(DEFINE)\'; CC=\'$(PERLMAINCC)\'; export DEFINE INC CC; \
- cd libs && $(MAKE) CC=$(CC) libsw$(LIB_EXT) -e
+ DEFINE=\'$(DEFINE)\'; CC=\'$(PERLMAINCC)\'; CFLAGS=\'$(CCFLAGS)\'; export DEFINE INC CC CFLAGS; \
+ cd libs && $(MAKE) CC=\'$(PERLMAINCC)\' CFLAGS=\'$(CCFLAGS) $(DEFINE)\' DEFINE=\'$(DEFINE)\' libsw$(LIB_EXT) -e
';
}
@@ -0,0 +1,30 @@
+# Matrix made by matblas from blosum45.iij
+# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units
+# Blocks Database = /data/blocks_5.0/blocks.dat
+# Cluster Percentage: >= 45
+# Entropy = 0.3795, Expected = -0.2789
+ A R N D C Q E G H I L K M F P S T W Y V B Z X
+A 5 -2 -1 -2 -1 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -2 -2 0 -1 -1 0
+R -2 7 0 -1 -3 1 0 -2 0 -3 -2 3 -1 -2 -2 -1 -1 -2 -1 -2 -1 0 -1
+N -1 0 6 2 -2 0 0 0 1 -2 -3 0 -2 -2 -2 1 0 -4 -2 -3 4 0 -1
+D -2 -1 2 7 -3 0 2 -1 0 -4 -3 0 -3 -4 -1 0 -1 -4 -2 -3 5 1 -1
+C -1 -3 -2 -3 12 -3 -3 -3 -3 -3 -2 -3 -2 -2 -4 -1 -1 -5 -3 -1 -2 -3 -2
+Q -1 1 0 0 -3 6 2 -2 1 -2 -2 1 0 -4 -1 0 -1 -2 -1 -3 0 4 -1
+E -1 0 0 2 -3 2 6 -2 0 -3 -2 1 -2 -3 0 0 -1 -3 -2 -3 1 4 -1
+G 0 -2 0 -1 -3 -2 -2 7 -2 -4 -3 -2 -2 -3 -2 0 -2 -2 -3 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Clustered Scoring Matrix in 1/3 Bit Units
+# Blocks Database = /data/blocks_5.0/blocks.dat
+# Cluster Percentage: >= 50
+# Entropy = 0.4808, Expected = -0.3573
+ A R N D C Q E G H I L K M F P S T W Y V B Z X
+A 5 -2 -1 -2 -1 -1 -1 0 -2 -1 -2 -1 -1 -3 -1 1 0 -3 -2 0 -2 -1 -1
+R -2 7 -1 -2 -4 1 0 -3 0 -4 -3 3 -2 -3 -3 -1 -1 -3 -1 -3 -1 0 -1
+N -1 -1 7 2 -2 0 0 0 1 -3 -4 0 -2 -4 -2 1 0 -4 -2 -3 4 0 -1
+D -2 -2 2 8 -4 0 2 -1 -1 -4 -4 -1 -4 -5 -1 0 -1 -5 -3 -4 5 1 -1
+C -1 -4 -2 -4 13 -3 -3 -3 -3 -2 -2 -3 -2 -2 -4 -1 -1 -5 -3 -1 -3 -3 -2
+Q -1 1 0 0 -3 7 2 -2 1 -3 -2 2 0 -4 -1 0 -1 -1 -1 -3 0 4 -1
+E -1 0 0 2 -3 2 6 -3 0 -4 -3 1 -2 -3 -1 -1 -1 -3 -2 -3 1 5 -1
+G 0 -3 0 -1 -3 -2 -3 8 -2 -4 -4 -2 -3 -4 -2 0 -2 -3 -3 -4 -1 -2 -2
+H -2 0 1 -1 -3 1 0 -2 10 -4 -3 0 -1 -1 -2 -1 -2 -3 2 -4 0 0 -1
+I -1 -4 -3 -4 -2 -3 -4 -4 -4 5 2 -3 2 0 -3 -3 -1 -3 -1 4 -4 -3 -1
+L -2 -3 -4 -4 -2 -2 -3 -4 -3 2 5 -3 3 1 -4 -3 -1 -2 -1 1 -4 -3 -1
+K -1 3 0 -1 -3 2 1 -2 0 -3 -3 6 -2 -4 -1 0 -1 -3 -2 -3 0 1 -1
+M -1 -2 -2 -4 -2 0 -2 -3 -1 2 3 -2 7 0 -3 -2 -1 -1 0 1 -3 -1 -1
+F -3 -3 -4 -5 -2 -4 -3 -4 -1 0 1 -4 0 8 -4 -3 -2 1 4 -1 -4 -4 -2
+P -1 -3 -2 -1 -4 -1 -1 -2 -2 -3 -4 -1 -3 -4 10 -1 -1 -4 -3 -3 -2 -1 -2
+S 1 -1 1 0 -1 0 -1 0 -1 -3 -3 0 -2 -3 -1 5 2 -4 -2 -2 0 0 -1
+T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 2 5 -3 -2 0 0 -1 0
+W -3 -3 -4 -5 -5 -1 -3 -3 -3 -3 -2 -3 -1 1 -4 -4 -3 15 2 -3 -5 -2 -3
+Y -2 -1 -2 -3 -3 -1 -2 -3 2 -1 -1 -2 0 4 -3 -2 -2 2 8 -1 -3 -2 -1
+V 0 -3 -3 -4 -1 -3 -3 -4 -4 4 1 -3 1 -1 -3 -2 0 -3 -1 5 -4 -3 -1
+B -2 -1 4 5 -3 0 1 -1 0 -4 -4 0 -3 -4 -2 0 0 -5 -3 -4 5 2 -1
+Z -1 0 0 1 -3 4 5 -2 0 -3 -3 1 -1 -4 -1 0 -1 -2 -2 -3 2 5 -1
+X -1 -1 -1 -1 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 0 -3 -1 -1 -1 -1 -1
@@ -0,0 +1,30 @@
+# Matrix made by matblas from blosum62.iij
+# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units
+# Blocks Database = /data/blocks_5.0/blocks.dat
+# Cluster Percentage: >= 62
+# Entropy = 0.6979, Expected = -0.5209
+ A R N D C Q E G H I L K M F P S T W Y V B Z X
+A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 0
+R -1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3 -1 0 -1
+N -2 0 6 1 -3 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1
+D -2 -2 1 6 -3 0 2 -1 -1 -3 -4 -1 -3 -3 -1 0 -1 -4 -3 -3 4 1 -1
+C 0 -3 -3 -3 9 -3 -4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