Permalink
Browse files

This commit was manufactured by cvs2svn to create tag

'bioperl-ext-devel-1-3-01'.

svn path=/bioperl-ext/tags/bioperl-ext-devel-1-3-01/; revision=659
  • Loading branch information...
1 parent 8695d5b commit 863f8c6bae42d1de30fecafbc56d8b68e55e4368 nobody committed Sep 26, 2005
View
@@ -3323,9 +3323,6 @@ Align_DNA_Sequences(seq1, seq2, match, mismatch, gap, ext, 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;
@@ -3334,136 +3331,15 @@ Align_DNA_Sequences(seq1, seq2, match, mismatch, gap, ext, alg)
RETVAL
dpAlign_AlignOutput *
-Align_Protein_Sequences(seq1, seq2, matrix, alg)
+Align_Protein_Sequences(seq1, seq2, matrix)
char * seq1
char * seq2
- dpAlign_ScoringMatrix * matrix
- int alg
+ char * matrix
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 *
@@ -3514,18 +3390,3 @@ end2(obj)
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' => '1.5.1',
+ 'VERSION' => '0.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)\'; CFLAGS=\'$(CCFLAGS)\'; export DEFINE INC CC CFLAGS; \
- cd libs && $(MAKE) CC=\'$(PERLMAINCC)\' CFLAGS=\'$(CCFLAGS) $(DEFINE)\' DEFINE=\'$(DEFINE)\' libsw$(LIB_EXT) -e
+ DEFINE=\'$(DEFINE)\'; CC=\'$(PERLMAINCC)\'; export DEFINE INC CC; \
+ cd libs && $(MAKE) CC=$(CC) libsw$(LIB_EXT) -e
';
}
@@ -1,30 +0,0 @@
-# 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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-1 -2 -2 -3 -1 -2 -3 2 0 0 -1 0 3 -3 -2 -1 3 8 -1 -2 -2 -1
-V 0 -2 -3 -3 -1 -3 -3 -3 -3 3 1 -2 1 0 -3 -1 0 -3 -1 5 -3 -3 -1
-B -1 -1 4 5 -2 0 1 -1 0 -3 -3 0 -2 -3 -2 0 0 -4 -2 -3 4 2 -1
-Z -1 0 0 1 -3 4 4 -2 0 -3 -2 1 -1 -3 -1 0 -1 -2 -2 -3 2 4 -1
-X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -2 -1 -1 -1 -1 -1
-
@@ -1,29 +0,0 @@
-# Matrix made by matblas from blosum50.iij
-# BLOSUM 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 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 -2 -4 7 -1 -1 -4 -3 -2 -2 -1 -2
-S 1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4 1 -3 -2 -2 0 0 0
-T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 -2 -2 0 -1 -1 0
-W -3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1 1 -4 -3 -2 11 2 -3 -4 -3 -2
-Y -2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -1 -3 -2 -1
-V 0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 -3 -2 -1
-B -2 -1 3 4 -3 0 1 -1 0 -3 -4 0 -3 -3 -2 0 -1 -4 -3 -3 4 1 -1
-Z -1 0 0 1 -3 3 4 -2 0 -3 -3 1 -1 -3 -1 0 -1 -3 -2 -2 1 4 -1
-X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 0 0 -2 -1 -1 -1 -1 -1
-
@@ -189,110 +189,3 @@ align(unsigned char * A, unsigned char * B, int M, int N, int ** s, int g, int e
}
return midc;
}
-
-/*
- pgreen runs Phil Green's algorithm to calculate alignment score between
- two sequences. The argument waa is a sequence profile derived from
- the query sequence and the scoring matrix. The second argument M is
- the length of query sequence. B is the sequence to compare to. N is
- the length of the second sequence. gap is the gap opening cost. ext
- is the gap extension cost. ss is a preallocated array of struct swstr
- with a size of M.
-
- Most of the code in this function is copied from the do_work function
- in dropgsw.c inside the FASTA distribution.
- */
-int
-pgreen(int * waa, int M, unsigned char * B, int N, int gap, int ext, struct swstr * ss)
-{
- int score;
- int e, f, h, p, i, temp;
- struct swstr * ssj;
-
- int * pwaa;
-
- gap = gap + ext;
- ext = -ext;
- ss[M].H = -1;
- ss[M].E = 1;
- score = 0;
- for (h = 0; h < M; ++h) {
- ss[h].H = ss[h].E = 0;
- }
-
- for (i = 0; i < N; ++i) {
- pwaa = waa + B[i]*M;
- ssj = ss;
-
- e = f = h = p = 0;
- zero_f:
- while (1) {
- h = p + *pwaa++;
- p = ssj->H;
- if ((e = ssj->E) > 0) {
- if (p == -1) goto next_row;
- if (h < e) h = e;
- else if (h > gap) {
- e += ext;
- goto transition;
- }
- e += ext;
- ssj->E = (e > 0) ? e : 0;
- ssj++->H = h;
- }
- else {
- if (h > 0) {
- if (h > gap) {
- e = 0;
- goto transition;
- }
- ssj++->H = h;
- }
- else ssj++->H = 0;
- }
- }
-
- transition:
- if (score < h) score = h;
-
- temp = h - gap;
- if (f < temp) f = temp;
- if (e < temp) e = temp;
- ssj->E = (e > 0) ? e : 0;
- ssj++->H = h;
- e = 0;
-
- do {
- h = p + *pwaa++;
- p = ssj->H;
-
- if (h < f) h = f;
- f += ext;
-
- if ((e = ssj->E) > 0) {
- if (p == -1) goto next_row;
- if (h < e) h = e;
- else if (h > gap) {
- e += ext;
- goto transition;
- }
- e += ext;
- ssj->E = (e > 0) ? e : 0;
- ssj++->H = h;
- }
- else {
- if (h > gap) {
- e = 0;
- goto transition;
- }
- ssj++->H = h;
- }
- } while (f > 0);
- goto zero_f;
- next_row:
- ;
- }
-
- free(waa);
- return score;
-}
Oops, something went wrong. Retry.

0 comments on commit 863f8c6

Please sign in to comment.