Package: psortb / 3.0.4+dfsg-2~bpo8+1

fix_hmmer_interface.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 17 Mar 2017 10:23:15 +010
Description: Enable linking against libhmmer.a as packaged
 in hmmer2 source package

--- a/algorithm-hmm/hmm-binding.cpp
+++ b/algorithm-hmm/hmm-binding.cpp
@@ -71,7 +71,7 @@ int HMM::load(char *filename) {
   if(strlen(filename) == 0) return -1;
 
   // Load the model from the specified file.
-  if((hmmfp = HMMFileOpen(filename, "HMMERDB")) == NULL) return -1;
+  if((hmmfp = HMMFileOpen(filename, (char *)"HMMERDB")) == NULL) return -1;
 
   if(! HMMFileRead(hmmfp, &tmp_model)) {
     HMMFileClose(hmmfp);
@@ -95,25 +95,26 @@ int HMM::load(char *filename) {
 
 HMMReport *HMM::search(char *seq) {
   struct tophit_s *ghit, *dhit;
+  struct dpmatrix_s *mx;
   struct p7trace_s *trace;
   double pvalue, evalue;
   int numhits;
   HMMReport *hmmrep;
   float score;
   int seqlen;
-  char *dseq;
+  unsigned char *dseq;
 
   // Ensure we have a valid model and sequence.
   if((model == NULL) ||(seq == NULL) || (!(seqlen = strlen(seq)))) return NULL;
 
   // Convert the sequence to the format the HMMER library expects.
-  dseq = DigitizeSequence(seq, seqlen);
+  dseq = DigitizeSequence((char *)seq, seqlen);
 
   // Calculate the raw scores for the sequence.
   if (P7ViterbiSize(seqlen, model->M) <= RAMLIMIT)
-    score = P7Viterbi(dseq, seqlen, model, &trace);
+    score = P7Viterbi(dseq, seqlen, model, mx, &trace);
   else
-    score = P7SmallViterbi(dseq, seqlen, model, &trace);
+    score = P7SmallViterbi(dseq, seqlen, model, mx, &trace);
 
 
   // Calculate the score using the forward algorithm if we need.
@@ -241,7 +242,7 @@ void HMM::init(char *filename, int df, i
   thresh.globT   = -FLT_MAX;
   thresh.domT    = -FLT_MAX;
   thresh.domE    = FLT_MAX;
-  thresh.autocut = CUT_NONE;
+  thresh.autocut = threshold_s::CUT_NONE;
   thresh.Z       = 1;
 
   doForward = df;