[med-svn] [Git][med-team/libtfbs-perl][master] 4 commits: d/control: declare compliance to standards version 4.7.0.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Wed Jul 10 16:31:52 BST 2024



Étienne Mollier pushed to branch master at Debian Med / libtfbs-perl


Commits:
c2f05468 by Étienne Mollier at 2024-07-10T17:08:39+02:00
d/control: declare compliance to standards version 4.7.0.

- - - - -
1e160989 by Étienne Mollier at 2024-07-10T17:12:32+02:00
Rename gcc-14.patch to dpkg-1.22.6.patch.

The issue addressed by gcc-14.patch originally resulted from a change
in dpkg 1.22.6 in options passed to gcc.

- - - - -
8b5fe3fd by Étienne Mollier at 2024-07-10T17:27:55+02:00
gcc-14.patch: new: fix build failure with gcc 14.

Build failures were caused by functions implicitly declared as
returning an integer type.

Closes: #1075213

- - - - -
710084b6 by Étienne Mollier at 2024-07-10T17:30:54+02:00
ready to upload to unstable.

- - - - -


5 changed files:

- debian/changelog
- debian/control
- + debian/patches/dpkg-1.22.6.patch
- debian/patches/gcc-14.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+libtfbs-perl (0.7.1+ds-4) unstable; urgency=medium
+
+  * d/control: declare compliance to standards version 4.7.0.
+  * Rename gcc-14.patch to dpkg-1.22.6.patch.
+    The issue addressed by gcc-14.patch originally resulted from a change
+    in dpkg 1.22.6 in options passed to gcc.
+  * gcc-14.patch: new: fix build failure with gcc 14.
+    Build failures were caused by functions implicitly declared as
+    returning an integer type. (Closes: #1075213)
+
+ -- Étienne Mollier <emollier at debian.org>  Wed, 10 Jul 2024 17:29:17 +0200
+
 libtfbs-perl (0.7.1+ds-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -12,7 +12,7 @@ Build-Depends: debhelper-compat (= 13),
                bioperl,
                libwww-perl,
                libdbi-perl
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
 Vcs-Browser: https://salsa.debian.org/med-team/libtfbs-perl
 Vcs-Git: https://salsa.debian.org/med-team/libtfbs-perl.git
 Homepage: http://tfbs.genereg.net


=====================================
debian/patches/dpkg-1.22.6.patch
=====================================
@@ -0,0 +1,824 @@
+Description: Fix FTBFS with GCC 14.
+ https://gcc.gnu.org/gcc-14/porting_to.html#implicit-function-declaration
+Author: Bas Couwenberg <sebastic at debian.org>
+Bug-Debian: https://bugs.debian.org/1066716
+
+--- a/Ext/lib/pwm_searchPFF.c
++++ b/Ext/lib/pwm_searchPFF.c
+@@ -33,81 +33,6 @@
+  *------------------------------------------------------------------*/
+ #include "pwm_search.h"
+ 
+-int do_search(char* matrixfile, 
+-	      char* seqfile,
+-	      float threshold,
+-	      char* tfname,
+-	      char* tfclass,
+-	      char* outfile)
+-     /*was: main
+-       int argc;
+-       char **argv;*/
+-{
+-   double pwm[2*MAXCOUNTS];   /* for pwm matrix */
+-                              /* do own indexing; 5*pos + nt */
+-   int exitval = -1;          /* exit value from main */
+-   struct arguments args;          /* command line args */
+-   FILE *fp;                  /* for sequence input file */
+-   FILE *outfp;
+-   NUM_ERRS = 0;
+-    if (__DEBUG__) fprintf(stderr, "%s %s %f %s %s %s\n", matrixfile, seqfile, threshold, tfname, tfclass, outfile);
+-   if ( __DEBUG__ )
+-      announce("+++\nEntering main.\n+++\n");
+-
+-   /* Parse command line arguments */
+-   /*if ( get_cmd_args(argc,argv,&args) )
+-   {
+-      err_log(
+-      "Usage:  pwm_searchPFF pwm_file seq_file threshold [-a][-b]|[-m mask_file] [-n TFname] [-c TFclass]\n"
+-             );
+-	     }*/
+-
+-   strcpy(args.counts_file, matrixfile);
+-   strcpy(args.seq_file, seqfile);
+-   args.threshold = threshold;
+-   strcpy(args.name, tfname);
+-   strcpy(args.class, tfclass);
+-   args.print_all = 0;
+-   args.best_only= 0;
+-   /* Read in the pwm; calculate max/min score */
+-   //else 
+-   if ( get_matrix(&args,pwm) )
+-   {
+-      err_log("MAIN: get_matrix failed.");
+-   }
+-
+-   /* Open the sequence file */
+-   else if ( (fp=fopen(args.seq_file,"r")) == NULL )
+-   {
+-      err_log("MAIN: open_seq_file failed.");
+-   }
+-   else if ( (outfp=fopen(outfile,"w")) == NULL )
+-   {
+-      err_log("MAIN: open_outfile failed.");
+-   }
+- 
+-   /* Loop on sequences */
+-   else if ( loop_on_seqs(&args,pwm,fp,outfp) )
+-   {
+-      err_log("MAIN:  loop_on_seqs failed.");
+-   }
+-
+-   /* Normal completion */
+-   else
+-   {
+-      exitval = 0;
+-   }
+-
+-   /* Clean up and close out */
+-   err_show();
+-   fclose(fp);
+-   fclose(outfp);
+-   if ( __DEBUG__ )
+-      announce("+++\nLeaving main.\n+++\n");
+- 
+-   return(exitval);
+-}
+-
+ /*--------------------------------------------------------------------
+  * Announce
+  *
+@@ -126,185 +51,6 @@ char *msg;
+    return(retval);
+ }
+ 
+-/*--------------------------------------------------------------------
+- * BEST_SAVE - Save the best score so far
+- * 
+- * Called by do_seq
+- * 
+- * Returns: 0 
+- *------------------------------------------------------------------*/
+-int best_save(struct arguments* pargs, long base, int strand, double score)
+-     //struct arguments *pargs;  /* args from command line */
+-     //long base;           /* base where score occurs */
+-     //int strand;          /* strand where score occurs */
+-     //double score;        /* score of hit to save */
+-{
+-   if ( pargs->best_base < 0  ||  score > pargs->best_score )
+-   {
+-      pargs->best_base = base;
+-      pargs->best_score = score;
+-      pargs->best_strand = strand;
+-   }
+-
+-   return(0);
+-}
+-
+-/*--------------------------------------------------------------------
+- * BEST_PULL - Copy back the best score saved
+- * 
+- * Called by do_seq
+- * 
+- * Returns: 0 
+- *------------------------------------------------------------------*/
+-best_pull(pargs,pbase,pstrand,pscore)
+-struct arguments *pargs;  /* args from command line */
+-long *pbase;         /* base where score occurs */
+-int *pstrand;        /* strand where score occurs */
+-double *pscore;      /* score of hit to pull back */
+-{
+-   *pbase = pargs->best_base;
+-   if ( pargs->best_base >= 0 )
+-   {
+-      *pscore = pargs->best_score;
+-      *pstrand = pargs->best_strand;
+-   }
+-   return(0);
+-}
+-
+-/*--------------------------------------------------------------------
+- * DO_SEQ - Search through the given sequence with the given matrix
+- * 
+- * Called by loop_on_seqs
+- * 
+- * Returns: 0 for success, -1 for failure.
+- *------------------------------------------------------------------*/
+-int
+-do_seq(pargs,pwm,seqid,seq,outfp)
+-struct arguments *pargs;  /* args from command line */
+-double *pwm;         /* pwm from get_matrix */
+-char *seqid;         /* id of sequence to work on */
+-char *seq;           /* the sequence to work on */
+-FILE *outfp;
+-{
+-   double backward_score;
+-   double forward_score;
+-   double score;
+-   long base;
+-   int done = 0;
+-   int nt;
+-   int pos;
+-   int retval = 0;
+-   int strand;
+-   long l;
+-   long nhit=0L;
+-   struct HIT hits[MAXHITS];
+-
+-   if ( __DEBUG__ )
+-      announce("+++\nEntering do_seq.\n+++\n");
+-
+-   /* first make sure sequence is long enough */
+-   for ( base=0; base < pargs->width; ++base )
+-   {
+-      if ( seq[base] == '\0' )
+-         done = 1;
+-   }
+-
+-   /* loop on windows */
+-   pargs->best_base = -1;
+-   for ( base=0; !retval && !done && seq[base+pargs->width-1]; ++base )
+-   {
+-      forward_score = 0.0;
+-      backward_score = 0.0;
+-      for ( pos=0; pos<pargs->width; ++pos )
+-      {
+-         nt = TRANS[seq[base+pos]];
+-         forward_score += pwm[5*pos + nt];
+-         nt = ( nt==4 ) ? 4 : 3-nt;
+-         backward_score += pwm[5*(pargs->width - pos -1) + nt];
+-      }
+-      if ( forward_score > pargs->threshold )
+-      {
+-         if ( pargs->print_all )
+-         {
+-            if ( save_hit(base,0,forward_score,hits,&nhit) )
+-            {
+-               err_log("DO_SEQ:  save_hit failed");
+-               retval = -1;
+-            }
+-         }
+-         else if ( pargs->best_only )
+-         {
+-            best_save(pargs,base,0,forward_score);
+-         }
+-         else if ( output(pargs,seqid,base,seq,0,forward_score,outfp) )
+-         {
+-             err_log("DO_SEQ:  output failed");
+-             retval = -1;
+-         }
+-      }
+-      if ( backward_score > pargs->threshold )
+-      {
+-         if ( pargs->print_all )
+-         {
+-            if ( save_hit(base,1,backward_score,hits,&nhit) )
+-            {
+-               err_log("DO_SEQ:  save_hit failed");
+-               retval = -1;
+-            }
+-         }
+-         else if ( pargs->best_only )
+-         {
+-            best_save(pargs,base,1,backward_score);
+-         }
+-         else if ( output(pargs,seqid,base,seq,1,backward_score, outfp) )
+-         {
+-             err_log("DO_SEQ:  output failed");
+-             retval = -1;
+-         }
+-      }
+-      
+-   }
+-
+-   if ( pargs->print_all )
+-   {
+-      for ( l=0; l<nhit; ++l )
+-         printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
+-/*
+-      printf("# forward strand hits\n\n");
+-      for ( l=0; l<nhit; ++l )
+-      {
+-         if ( hits[l].strand == 0 )
+-            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
+-      }
+-      printf("\n# comp strand hits\n\n");
+-      for ( l=0; l<nhit; ++l )
+-      {
+-         if ( hits[l].strand == 1 )
+-            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
+-      }
+-*/
+-   }
+-
+-   else
+-   {
+-      best_pull(pargs,&base,&strand,&score);
+-      if ( base>=0 )
+-      {
+-         if ( output(pargs,seqid,base,seq,strand,score,outfp) )
+-         {
+-             err_log("DO_SEQ:  output failed");
+-             retval = -1;
+-         }
+-      }
+-   }
+- 
+-   if ( __DEBUG__ )
+-      announce("+++\nLeaving do_seq.\n+++\n");
+-
+-   return(retval);
+- 
+-}
+-
+ /***********************************************************************
+  * ERR_LOG and ERR_SHOW
+  *
+@@ -341,85 +87,37 @@ err_show()
+    return;
+ }     
+ 
++
+ /*--------------------------------------------------------------------
+- * GET_CMD_ARGS - Parse execute line, fill arg structure.
++ * SAVE_HIT - save location, strand and score of a hit in an array of such
+  * 
+- * Called by main.
++ * Called by do_seq.
+  * 
+  * Returns: 0 for success, -1 for failure.
+  *------------------------------------------------------------------*/
+-int get_cmd_args(argc,argv,pargs)
+-int argc;            /* argc as passed to main */
+-char **argv;         /* argv as passed to main */
+-struct arguments *pargs;  /* args from command line */
++int
++save_hit(base,strand,score,hits,pnhit)
++long base;
++int strand;
++double score;
++struct HIT *hits;
++long *pnhit;
+ {
+    int retval = 0;
+-   int arg_count = 4;
+-
+-   if ( __DEBUG__ )
+-      announce("+++\nEntering get_cmd_args\n+++\n");
+ 
+-   /* See if we got at least three arguments */
+-   if ( argc < 4 )
+-   {  retval = -1;
+-      err_log("GET_CMD_ARGS: Too few arguments.");
++   if ( *pnhit == MAXHITS )
++   {
++      err_log("SAVE_HIT:  MAXHITS limit reached.");
++      retval = -1;
+    }
+ 
+-   /* Get the arguments */
+-   else
+-   {  strcpy(pargs->counts_file,argv[1]);
+-      strcpy(pargs->seq_file,argv[2]);
+-      pargs->threshold = atof(argv[3]);
+-      pargs->best_only = 0;
+-      pargs->print_all = 0;
+-      pargs->mask_file[0] = '\0';
+-      while (arg_count < argc) 
+-        { 
+-           if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='b' )
+-              {
+-               pargs->best_only = 1;
+-               arg_count++;
+-              }
+-            else if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='a' )
+-              {
+-               pargs->print_all = 1;
+-               arg_count++;
+-              }
+-            else if ( arg_count<argc-1 && 
+-               argv[arg_count][0]=='-' && argv[arg_count][1]=='m' && 
+-               argv[arg_count+1][0]!='\0' 
+-               )
+-              {
+-               strcpy(pargs->mask_file,argv[arg_count+1]);
+-               arg_count = arg_count+2;
+-	      }
+-            else if ( arg_count<argc-1 && 
+-               argv[arg_count][0]=='-' && argv[arg_count][1]=='n' && 
+-               argv[arg_count+1][0]!='\0' 
+-               )
+-              {
+-               strcpy(pargs->name,argv[arg_count+1]);
+-               arg_count = arg_count+2;
+-	      }
+-           else if ( arg_count<argc-1 && 
+-               argv[arg_count][0]=='-' && argv[arg_count][1]=='c' && 
+-               argv[arg_count+1][0]!='\0' 
+-               )
+-              {
+-               strcpy(pargs->class,argv[arg_count+1]);
+-               arg_count = arg_count+2;
+-	      }
+-            else 
+-	      {
+-	      arg_count++;
+-	      }
+-     }
+-   }
+-   if ( __DEBUG__ )
+-      announce("+++\nLeaving get_cmd_args\n+++\n");
+-   return( retval );
++   hits[*pnhit].base = base;
++   hits[*pnhit].strand = strand;
++   hits[*pnhit].score = score;
++   *pnhit = *pnhit + 1;
++
++   return(retval);
+ }
+- 
+ /*--------------------------------------------------------------------
+  * GET_MATRIX - Read in pwm.
+  * 
+@@ -515,6 +213,85 @@ get_matrix(struct arguments* pargs, doub
+ }
+ 
+ /*--------------------------------------------------------------------
++ * GET_CMD_ARGS - Parse execute line, fill arg structure.
++ * 
++ * Called by main.
++ * 
++ * Returns: 0 for success, -1 for failure.
++ *------------------------------------------------------------------*/
++int get_cmd_args(argc,argv,pargs)
++int argc;            /* argc as passed to main */
++char **argv;         /* argv as passed to main */
++struct arguments *pargs;  /* args from command line */
++{
++   int retval = 0;
++   int arg_count = 4;
++
++   if ( __DEBUG__ )
++      announce("+++\nEntering get_cmd_args\n+++\n");
++
++   /* See if we got at least three arguments */
++   if ( argc < 4 )
++   {  retval = -1;
++      err_log("GET_CMD_ARGS: Too few arguments.");
++   }
++
++   /* Get the arguments */
++   else
++   {  strcpy(pargs->counts_file,argv[1]);
++      strcpy(pargs->seq_file,argv[2]);
++      pargs->threshold = atof(argv[3]);
++      pargs->best_only = 0;
++      pargs->print_all = 0;
++      pargs->mask_file[0] = '\0';
++      while (arg_count < argc) 
++        { 
++           if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='b' )
++              {
++               pargs->best_only = 1;
++               arg_count++;
++              }
++            else if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='a' )
++              {
++               pargs->print_all = 1;
++               arg_count++;
++              }
++            else if ( arg_count<argc-1 && 
++               argv[arg_count][0]=='-' && argv[arg_count][1]=='m' && 
++               argv[arg_count+1][0]!='\0' 
++               )
++              {
++               strcpy(pargs->mask_file,argv[arg_count+1]);
++               arg_count = arg_count+2;
++	      }
++            else if ( arg_count<argc-1 && 
++               argv[arg_count][0]=='-' && argv[arg_count][1]=='n' && 
++               argv[arg_count+1][0]!='\0' 
++               )
++              {
++               strcpy(pargs->name,argv[arg_count+1]);
++               arg_count = arg_count+2;
++	      }
++           else if ( arg_count<argc-1 && 
++               argv[arg_count][0]=='-' && argv[arg_count][1]=='c' && 
++               argv[arg_count+1][0]!='\0' 
++               )
++              {
++               strcpy(pargs->class,argv[arg_count+1]);
++               arg_count = arg_count+2;
++	      }
++            else 
++	      {
++	      arg_count++;
++	      }
++     }
++   }
++   if ( __DEBUG__ )
++      announce("+++\nLeaving get_cmd_args\n+++\n");
++   return( retval );
++}
++ 
++/*--------------------------------------------------------------------
+  * GET_SEQUENCE
+  * 
+  * Get the next sequence from the input file (fasta format)
+@@ -628,50 +405,48 @@ char *sequence;     /* text of sequence
+ }
+ 
+ /*--------------------------------------------------------------------
+- * LOOP_ON_SEQS - Loop through the sequences of the input file,
+- * doing the search and output.
++ * BEST_PULL - Copy back the best score saved
+  * 
+- * Called by main.
++ * Called by do_seq
+  * 
+- * Returns: 0 for success, -1 for failure.
++ * Returns: 0 
+  *------------------------------------------------------------------*/
+-int
+-loop_on_seqs(pargs,pwm,fp, outfp)
++best_pull(pargs,pbase,pstrand,pscore)
+ struct arguments *pargs;  /* args from command line */
+-double *pwm;         /* pwm, from get_matrix  */
+-FILE *fp;            /* sequence file pointer */
+-FILE *outfp;         /* output file pointer   */
++long *pbase;         /* base where score occurs */
++int *pstrand;        /* strand where score occurs */
++double *pscore;      /* score of hit to pull back */
+ {
+-   char seq[SEQLEN+1];
+-   char seqid[SEQNAMELEN+1];
+-   int done = 0;
+-   int retval=0;
+-   if ( __DEBUG__ )
+-      announce("+++\nEntering loop_on_seqs\n+++\n");
+-
+-   /* Main loop */
+-   while ( !retval && !done )
++   *pbase = pargs->best_base;
++   if ( pargs->best_base >= 0 )
+    {
+-      done = get_sequence(fp,seqid,seq);
+-      if ( done == -1 )
+-      {
+-         err_log("LOOP_ON_SEQS:  get_sequence failed.");
+-         retval = -1;
+-      }
+-      else if ( done == 0 )
+-      {
+-         if ( do_seq(pargs,pwm,seqid,seq,outfp) )
+-         {
+-            err_log("LOOP_ON_SEQS:  do_seq failed.");
+-            retval = -1;
+-         }
+-      }
++      *pscore = pargs->best_score;
++      *pstrand = pargs->best_strand;
+    }
++   return(0);
++}
+ 
+-   if ( __DEBUG__ )
+-      announce("+++\nLeaving loop_on_seqs\n+++\n");
++/*--------------------------------------------------------------------
++ * BEST_SAVE - Save the best score so far
++ * 
++ * Called by do_seq
++ * 
++ * Returns: 0 
++ *------------------------------------------------------------------*/
++int best_save(struct arguments* pargs, long base, int strand, double score)
++     //struct arguments *pargs;  /* args from command line */
++     //long base;           /* base where score occurs */
++     //int strand;          /* strand where score occurs */
++     //double score;        /* score of hit to save */
++{
++   if ( pargs->best_base < 0  ||  score > pargs->best_score )
++   {
++      pargs->best_base = base;
++      pargs->best_score = score;
++      pargs->best_strand = strand;
++   }
+ 
+-   return (retval);
++   return(0);
+ }
+ 
+ /*--------------------------------------------------------------------
+@@ -754,32 +529,257 @@ FILE *outfp;
+ }
+ 
+ /*--------------------------------------------------------------------
+- * SAVE_HIT - save location, strand and score of a hit in an array of such
++ * DO_SEQ - Search through the given sequence with the given matrix
+  * 
+- * Called by do_seq.
++ * Called by loop_on_seqs
+  * 
+  * Returns: 0 for success, -1 for failure.
+  *------------------------------------------------------------------*/
+ int
+-save_hit(base,strand,score,hits,pnhit)
+-long base;
+-int strand;
+-double score;
+-struct HIT *hits;
+-long *pnhit;
++do_seq(pargs,pwm,seqid,seq,outfp)
++struct arguments *pargs;  /* args from command line */
++double *pwm;         /* pwm from get_matrix */
++char *seqid;         /* id of sequence to work on */
++char *seq;           /* the sequence to work on */
++FILE *outfp;
+ {
++   double backward_score;
++   double forward_score;
++   double score;
++   long base;
++   int done = 0;
++   int nt;
++   int pos;
+    int retval = 0;
++   int strand;
++   long l;
++   long nhit=0L;
++   struct HIT hits[MAXHITS];
+ 
+-   if ( *pnhit == MAXHITS )
++   if ( __DEBUG__ )
++      announce("+++\nEntering do_seq.\n+++\n");
++
++   /* first make sure sequence is long enough */
++   for ( base=0; base < pargs->width; ++base )
+    {
+-      err_log("SAVE_HIT:  MAXHITS limit reached.");
+-      retval = -1;
++      if ( seq[base] == '\0' )
++         done = 1;
+    }
+ 
+-   hits[*pnhit].base = base;
+-   hits[*pnhit].strand = strand;
+-   hits[*pnhit].score = score;
+-   *pnhit = *pnhit + 1;
++   /* loop on windows */
++   pargs->best_base = -1;
++   for ( base=0; !retval && !done && seq[base+pargs->width-1]; ++base )
++   {
++      forward_score = 0.0;
++      backward_score = 0.0;
++      for ( pos=0; pos<pargs->width; ++pos )
++      {
++         nt = TRANS[seq[base+pos]];
++         forward_score += pwm[5*pos + nt];
++         nt = ( nt==4 ) ? 4 : 3-nt;
++         backward_score += pwm[5*(pargs->width - pos -1) + nt];
++      }
++      if ( forward_score > pargs->threshold )
++      {
++         if ( pargs->print_all )
++         {
++            if ( save_hit(base,0,forward_score,hits,&nhit) )
++            {
++               err_log("DO_SEQ:  save_hit failed");
++               retval = -1;
++            }
++         }
++         else if ( pargs->best_only )
++         {
++            best_save(pargs,base,0,forward_score);
++         }
++         else if ( output(pargs,seqid,base,seq,0,forward_score,outfp) )
++         {
++             err_log("DO_SEQ:  output failed");
++             retval = -1;
++         }
++      }
++      if ( backward_score > pargs->threshold )
++      {
++         if ( pargs->print_all )
++         {
++            if ( save_hit(base,1,backward_score,hits,&nhit) )
++            {
++               err_log("DO_SEQ:  save_hit failed");
++               retval = -1;
++            }
++         }
++         else if ( pargs->best_only )
++         {
++            best_save(pargs,base,1,backward_score);
++         }
++         else if ( output(pargs,seqid,base,seq,1,backward_score, outfp) )
++         {
++             err_log("DO_SEQ:  output failed");
++             retval = -1;
++         }
++      }
++      
++   }
++
++   if ( pargs->print_all )
++   {
++      for ( l=0; l<nhit; ++l )
++         printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
++/*
++      printf("# forward strand hits\n\n");
++      for ( l=0; l<nhit; ++l )
++      {
++         if ( hits[l].strand == 0 )
++            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
++      }
++      printf("\n# comp strand hits\n\n");
++      for ( l=0; l<nhit; ++l )
++      {
++         if ( hits[l].strand == 1 )
++            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
++      }
++*/
++   }
++
++   else
++   {
++      best_pull(pargs,&base,&strand,&score);
++      if ( base>=0 )
++      {
++         if ( output(pargs,seqid,base,seq,strand,score,outfp) )
++         {
++             err_log("DO_SEQ:  output failed");
++             retval = -1;
++         }
++      }
++   }
++ 
++   if ( __DEBUG__ )
++      announce("+++\nLeaving do_seq.\n+++\n");
+ 
+    return(retval);
++ 
++}
++
++/*--------------------------------------------------------------------
++ * LOOP_ON_SEQS - Loop through the sequences of the input file,
++ * doing the search and output.
++ * 
++ * Called by main.
++ * 
++ * Returns: 0 for success, -1 for failure.
++ *------------------------------------------------------------------*/
++int
++loop_on_seqs(pargs,pwm,fp, outfp)
++struct arguments *pargs;  /* args from command line */
++double *pwm;         /* pwm, from get_matrix  */
++FILE *fp;            /* sequence file pointer */
++FILE *outfp;         /* output file pointer   */
++{
++   char seq[SEQLEN+1];
++   char seqid[SEQNAMELEN+1];
++   int done = 0;
++   int retval=0;
++   if ( __DEBUG__ )
++      announce("+++\nEntering loop_on_seqs\n+++\n");
++
++   /* Main loop */
++   while ( !retval && !done )
++   {
++      done = get_sequence(fp,seqid,seq);
++      if ( done == -1 )
++      {
++         err_log("LOOP_ON_SEQS:  get_sequence failed.");
++         retval = -1;
++      }
++      else if ( done == 0 )
++      {
++         if ( do_seq(pargs,pwm,seqid,seq,outfp) )
++         {
++            err_log("LOOP_ON_SEQS:  do_seq failed.");
++            retval = -1;
++         }
++      }
++   }
++
++   if ( __DEBUG__ )
++      announce("+++\nLeaving loop_on_seqs\n+++\n");
++
++   return (retval);
++}
++
++int do_search(char* matrixfile, 
++	      char* seqfile,
++	      float threshold,
++	      char* tfname,
++	      char* tfclass,
++	      char* outfile)
++     /*was: main
++       int argc;
++       char **argv;*/
++{
++   double pwm[2*MAXCOUNTS];   /* for pwm matrix */
++                              /* do own indexing; 5*pos + nt */
++   int exitval = -1;          /* exit value from main */
++   struct arguments args;          /* command line args */
++   FILE *fp;                  /* for sequence input file */
++   FILE *outfp;
++   NUM_ERRS = 0;
++    if (__DEBUG__) fprintf(stderr, "%s %s %f %s %s %s\n", matrixfile, seqfile, threshold, tfname, tfclass, outfile);
++   if ( __DEBUG__ )
++      announce("+++\nEntering main.\n+++\n");
++
++   /* Parse command line arguments */
++   /*if ( get_cmd_args(argc,argv,&args) )
++   {
++      err_log(
++      "Usage:  pwm_searchPFF pwm_file seq_file threshold [-a][-b]|[-m mask_file] [-n TFname] [-c TFclass]\n"
++             );
++	     }*/
++
++   strcpy(args.counts_file, matrixfile);
++   strcpy(args.seq_file, seqfile);
++   args.threshold = threshold;
++   strcpy(args.name, tfname);
++   strcpy(args.class, tfclass);
++   args.print_all = 0;
++   args.best_only= 0;
++   /* Read in the pwm; calculate max/min score */
++   //else 
++   if ( get_matrix(&args,pwm) )
++   {
++      err_log("MAIN: get_matrix failed.");
++   }
++
++   /* Open the sequence file */
++   else if ( (fp=fopen(args.seq_file,"r")) == NULL )
++   {
++      err_log("MAIN: open_seq_file failed.");
++   }
++   else if ( (outfp=fopen(outfile,"w")) == NULL )
++   {
++      err_log("MAIN: open_outfile failed.");
++   }
++ 
++   /* Loop on sequences */
++   else if ( loop_on_seqs(&args,pwm,fp,outfp) )
++   {
++      err_log("MAIN:  loop_on_seqs failed.");
++   }
++
++   /* Normal completion */
++   else
++   {
++      exitval = 0;
++   }
++
++   /* Clean up and close out */
++   err_show();
++   fclose(fp);
++   fclose(outfp);
++   if ( __DEBUG__ )
++      announce("+++\nLeaving main.\n+++\n");
++ 
++   return(exitval);
+ }


=====================================
debian/patches/gcc-14.patch
=====================================
@@ -1,824 +1,56 @@
-Description: Fix FTBFS with GCC 14.
- https://gcc.gnu.org/gcc-14/porting_to.html#implicit-function-declaration
-Author: Bas Couwenberg <sebastic at debian.org>
-Bug-Debian: https://bugs.debian.org/1066716
+Description: fix implicit int return types with gcc 14.
+ This fixes the following build failure:
+ .
+  ./lib/pwm_searchPFF.c:303:1: error: return type defaults to ‘int’ [-Wimplicit-int]
+    303 | get_sequence(fp,seq_id,sequence)
+        | ^~~~~~~~~~~~
+  ./lib/pwm_searchPFF.c:414:1: error: return type defaults to ‘int’ [-Wimplicit-int]
+    414 | best_pull(pargs,pbase,pstrand,pscore)
+        | ^~~~~~~~~
 
---- a/Ext/lib/pwm_searchPFF.c
-+++ b/Ext/lib/pwm_searchPFF.c
-@@ -33,81 +33,6 @@
+Author: Étienne Mollier <emollier at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075213
+Forwarded: https://github.com/ComputationalRegulatoryGenomicsICL/TFBS/pull/4
+Last-Update: 2024-07-10
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- libtfbs-perl.orig/Ext/lib/pwm_searchPFF.c
++++ libtfbs-perl/Ext/lib/pwm_searchPFF.c
+@@ -300,7 +300,7 @@
+  * 
+  * Return 0 normally, -1 on error, 1 if called at EOF.
   *------------------------------------------------------------------*/
- #include "pwm_search.h"
- 
--int do_search(char* matrixfile, 
--	      char* seqfile,
--	      float threshold,
--	      char* tfname,
--	      char* tfclass,
--	      char* outfile)
--     /*was: main
--       int argc;
--       char **argv;*/
--{
--   double pwm[2*MAXCOUNTS];   /* for pwm matrix */
--                              /* do own indexing; 5*pos + nt */
--   int exitval = -1;          /* exit value from main */
--   struct arguments args;          /* command line args */
--   FILE *fp;                  /* for sequence input file */
--   FILE *outfp;
--   NUM_ERRS = 0;
--    if (__DEBUG__) fprintf(stderr, "%s %s %f %s %s %s\n", matrixfile, seqfile, threshold, tfname, tfclass, outfile);
--   if ( __DEBUG__ )
--      announce("+++\nEntering main.\n+++\n");
--
--   /* Parse command line arguments */
--   /*if ( get_cmd_args(argc,argv,&args) )
--   {
--      err_log(
--      "Usage:  pwm_searchPFF pwm_file seq_file threshold [-a][-b]|[-m mask_file] [-n TFname] [-c TFclass]\n"
--             );
--	     }*/
--
--   strcpy(args.counts_file, matrixfile);
--   strcpy(args.seq_file, seqfile);
--   args.threshold = threshold;
--   strcpy(args.name, tfname);
--   strcpy(args.class, tfclass);
--   args.print_all = 0;
--   args.best_only= 0;
--   /* Read in the pwm; calculate max/min score */
--   //else 
--   if ( get_matrix(&args,pwm) )
--   {
--      err_log("MAIN: get_matrix failed.");
--   }
--
--   /* Open the sequence file */
--   else if ( (fp=fopen(args.seq_file,"r")) == NULL )
--   {
--      err_log("MAIN: open_seq_file failed.");
--   }
--   else if ( (outfp=fopen(outfile,"w")) == NULL )
--   {
--      err_log("MAIN: open_outfile failed.");
--   }
-- 
--   /* Loop on sequences */
--   else if ( loop_on_seqs(&args,pwm,fp,outfp) )
--   {
--      err_log("MAIN:  loop_on_seqs failed.");
--   }
--
--   /* Normal completion */
--   else
--   {
--      exitval = 0;
--   }
--
--   /* Clean up and close out */
--   err_show();
--   fclose(fp);
--   fclose(outfp);
--   if ( __DEBUG__ )
--      announce("+++\nLeaving main.\n+++\n");
-- 
--   return(exitval);
--}
--
- /*--------------------------------------------------------------------
-  * Announce
-  *
-@@ -126,185 +51,6 @@ char *msg;
-    return(retval);
- }
- 
--/*--------------------------------------------------------------------
-- * BEST_SAVE - Save the best score so far
-- * 
-- * Called by do_seq
-- * 
-- * Returns: 0 
-- *------------------------------------------------------------------*/
--int best_save(struct arguments* pargs, long base, int strand, double score)
--     //struct arguments *pargs;  /* args from command line */
--     //long base;           /* base where score occurs */
--     //int strand;          /* strand where score occurs */
--     //double score;        /* score of hit to save */
--{
--   if ( pargs->best_base < 0  ||  score > pargs->best_score )
--   {
--      pargs->best_base = base;
--      pargs->best_score = score;
--      pargs->best_strand = strand;
--   }
--
--   return(0);
--}
--
--/*--------------------------------------------------------------------
-- * BEST_PULL - Copy back the best score saved
-- * 
-- * Called by do_seq
-- * 
-- * Returns: 0 
-- *------------------------------------------------------------------*/
--best_pull(pargs,pbase,pstrand,pscore)
--struct arguments *pargs;  /* args from command line */
--long *pbase;         /* base where score occurs */
--int *pstrand;        /* strand where score occurs */
--double *pscore;      /* score of hit to pull back */
--{
--   *pbase = pargs->best_base;
--   if ( pargs->best_base >= 0 )
--   {
--      *pscore = pargs->best_score;
--      *pstrand = pargs->best_strand;
--   }
--   return(0);
--}
--
--/*--------------------------------------------------------------------
-- * DO_SEQ - Search through the given sequence with the given matrix
-- * 
-- * Called by loop_on_seqs
-- * 
-- * Returns: 0 for success, -1 for failure.
-- *------------------------------------------------------------------*/
--int
--do_seq(pargs,pwm,seqid,seq,outfp)
--struct arguments *pargs;  /* args from command line */
--double *pwm;         /* pwm from get_matrix */
--char *seqid;         /* id of sequence to work on */
--char *seq;           /* the sequence to work on */
--FILE *outfp;
--{
--   double backward_score;
--   double forward_score;
--   double score;
--   long base;
--   int done = 0;
--   int nt;
--   int pos;
--   int retval = 0;
--   int strand;
--   long l;
--   long nhit=0L;
--   struct HIT hits[MAXHITS];
--
--   if ( __DEBUG__ )
--      announce("+++\nEntering do_seq.\n+++\n");
--
--   /* first make sure sequence is long enough */
--   for ( base=0; base < pargs->width; ++base )
--   {
--      if ( seq[base] == '\0' )
--         done = 1;
--   }
--
--   /* loop on windows */
--   pargs->best_base = -1;
--   for ( base=0; !retval && !done && seq[base+pargs->width-1]; ++base )
--   {
--      forward_score = 0.0;
--      backward_score = 0.0;
--      for ( pos=0; pos<pargs->width; ++pos )
--      {
--         nt = TRANS[seq[base+pos]];
--         forward_score += pwm[5*pos + nt];
--         nt = ( nt==4 ) ? 4 : 3-nt;
--         backward_score += pwm[5*(pargs->width - pos -1) + nt];
--      }
--      if ( forward_score > pargs->threshold )
--      {
--         if ( pargs->print_all )
--         {
--            if ( save_hit(base,0,forward_score,hits,&nhit) )
--            {
--               err_log("DO_SEQ:  save_hit failed");
--               retval = -1;
--            }
--         }
--         else if ( pargs->best_only )
--         {
--            best_save(pargs,base,0,forward_score);
--         }
--         else if ( output(pargs,seqid,base,seq,0,forward_score,outfp) )
--         {
--             err_log("DO_SEQ:  output failed");
--             retval = -1;
--         }
--      }
--      if ( backward_score > pargs->threshold )
--      {
--         if ( pargs->print_all )
--         {
--            if ( save_hit(base,1,backward_score,hits,&nhit) )
--            {
--               err_log("DO_SEQ:  save_hit failed");
--               retval = -1;
--            }
--         }
--         else if ( pargs->best_only )
--         {
--            best_save(pargs,base,1,backward_score);
--         }
--         else if ( output(pargs,seqid,base,seq,1,backward_score, outfp) )
--         {
--             err_log("DO_SEQ:  output failed");
--             retval = -1;
--         }
--      }
--      
--   }
--
--   if ( pargs->print_all )
--   {
--      for ( l=0; l<nhit; ++l )
--         printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
--/*
--      printf("# forward strand hits\n\n");
--      for ( l=0; l<nhit; ++l )
--      {
--         if ( hits[l].strand == 0 )
--            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
--      }
--      printf("\n# comp strand hits\n\n");
--      for ( l=0; l<nhit; ++l )
--      {
--         if ( hits[l].strand == 1 )
--            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
--      }
--*/
--   }
--
--   else
--   {
--      best_pull(pargs,&base,&strand,&score);
--      if ( base>=0 )
--      {
--         if ( output(pargs,seqid,base,seq,strand,score,outfp) )
--         {
--             err_log("DO_SEQ:  output failed");
--             retval = -1;
--         }
--      }
--   }
-- 
--   if ( __DEBUG__ )
--      announce("+++\nLeaving do_seq.\n+++\n");
--
--   return(retval);
-- 
--}
--
- /***********************************************************************
-  * ERR_LOG and ERR_SHOW
-  *
-@@ -341,85 +87,37 @@ err_show()
-    return;
- }     
- 
-+
- /*--------------------------------------------------------------------
-- * GET_CMD_ARGS - Parse execute line, fill arg structure.
-+ * SAVE_HIT - save location, strand and score of a hit in an array of such
-  * 
-- * Called by main.
-+ * Called by do_seq.
-  * 
-  * Returns: 0 for success, -1 for failure.
+-get_sequence(fp,seq_id,sequence)
++int get_sequence(fp,seq_id,sequence)
+ FILE *fp;           /* file to read */
+ char *seq_id;       /* name of sequence */
+ char *sequence;     /* text of sequence */
+@@ -411,7 +411,7 @@
+  * 
+  * Returns: 0 
   *------------------------------------------------------------------*/
--int get_cmd_args(argc,argv,pargs)
--int argc;            /* argc as passed to main */
--char **argv;         /* argv as passed to main */
--struct arguments *pargs;  /* args from command line */
-+int
-+save_hit(base,strand,score,hits,pnhit)
-+long base;
-+int strand;
-+double score;
-+struct HIT *hits;
-+long *pnhit;
- {
-    int retval = 0;
--   int arg_count = 4;
--
--   if ( __DEBUG__ )
--      announce("+++\nEntering get_cmd_args\n+++\n");
- 
--   /* See if we got at least three arguments */
--   if ( argc < 4 )
--   {  retval = -1;
--      err_log("GET_CMD_ARGS: Too few arguments.");
-+   if ( *pnhit == MAXHITS )
-+   {
-+      err_log("SAVE_HIT:  MAXHITS limit reached.");
-+      retval = -1;
-    }
- 
--   /* Get the arguments */
--   else
--   {  strcpy(pargs->counts_file,argv[1]);
--      strcpy(pargs->seq_file,argv[2]);
--      pargs->threshold = atof(argv[3]);
--      pargs->best_only = 0;
--      pargs->print_all = 0;
--      pargs->mask_file[0] = '\0';
--      while (arg_count < argc) 
--        { 
--           if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='b' )
--              {
--               pargs->best_only = 1;
--               arg_count++;
--              }
--            else if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='a' )
--              {
--               pargs->print_all = 1;
--               arg_count++;
--              }
--            else if ( arg_count<argc-1 && 
--               argv[arg_count][0]=='-' && argv[arg_count][1]=='m' && 
--               argv[arg_count+1][0]!='\0' 
--               )
--              {
--               strcpy(pargs->mask_file,argv[arg_count+1]);
--               arg_count = arg_count+2;
--	      }
--            else if ( arg_count<argc-1 && 
--               argv[arg_count][0]=='-' && argv[arg_count][1]=='n' && 
--               argv[arg_count+1][0]!='\0' 
--               )
--              {
--               strcpy(pargs->name,argv[arg_count+1]);
--               arg_count = arg_count+2;
--	      }
--           else if ( arg_count<argc-1 && 
--               argv[arg_count][0]=='-' && argv[arg_count][1]=='c' && 
--               argv[arg_count+1][0]!='\0' 
--               )
--              {
--               strcpy(pargs->class,argv[arg_count+1]);
--               arg_count = arg_count+2;
--	      }
--            else 
--	      {
--	      arg_count++;
--	      }
--     }
--   }
--   if ( __DEBUG__ )
--      announce("+++\nLeaving get_cmd_args\n+++\n");
--   return( retval );
-+   hits[*pnhit].base = base;
-+   hits[*pnhit].strand = strand;
-+   hits[*pnhit].score = score;
-+   *pnhit = *pnhit + 1;
-+
-+   return(retval);
- }
-- 
- /*--------------------------------------------------------------------
-  * GET_MATRIX - Read in pwm.
-  * 
-@@ -515,6 +213,85 @@ get_matrix(struct arguments* pargs, doub
- }
- 
- /*--------------------------------------------------------------------
-+ * GET_CMD_ARGS - Parse execute line, fill arg structure.
-+ * 
-+ * Called by main.
-+ * 
-+ * Returns: 0 for success, -1 for failure.
-+ *------------------------------------------------------------------*/
-+int get_cmd_args(argc,argv,pargs)
-+int argc;            /* argc as passed to main */
-+char **argv;         /* argv as passed to main */
-+struct arguments *pargs;  /* args from command line */
-+{
-+   int retval = 0;
-+   int arg_count = 4;
-+
-+   if ( __DEBUG__ )
-+      announce("+++\nEntering get_cmd_args\n+++\n");
-+
-+   /* See if we got at least three arguments */
-+   if ( argc < 4 )
-+   {  retval = -1;
-+      err_log("GET_CMD_ARGS: Too few arguments.");
-+   }
-+
-+   /* Get the arguments */
-+   else
-+   {  strcpy(pargs->counts_file,argv[1]);
-+      strcpy(pargs->seq_file,argv[2]);
-+      pargs->threshold = atof(argv[3]);
-+      pargs->best_only = 0;
-+      pargs->print_all = 0;
-+      pargs->mask_file[0] = '\0';
-+      while (arg_count < argc) 
-+        { 
-+           if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='b' )
-+              {
-+               pargs->best_only = 1;
-+               arg_count++;
-+              }
-+            else if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='a' )
-+              {
-+               pargs->print_all = 1;
-+               arg_count++;
-+              }
-+            else if ( arg_count<argc-1 && 
-+               argv[arg_count][0]=='-' && argv[arg_count][1]=='m' && 
-+               argv[arg_count+1][0]!='\0' 
-+               )
-+              {
-+               strcpy(pargs->mask_file,argv[arg_count+1]);
-+               arg_count = arg_count+2;
-+	      }
-+            else if ( arg_count<argc-1 && 
-+               argv[arg_count][0]=='-' && argv[arg_count][1]=='n' && 
-+               argv[arg_count+1][0]!='\0' 
-+               )
-+              {
-+               strcpy(pargs->name,argv[arg_count+1]);
-+               arg_count = arg_count+2;
-+	      }
-+           else if ( arg_count<argc-1 && 
-+               argv[arg_count][0]=='-' && argv[arg_count][1]=='c' && 
-+               argv[arg_count+1][0]!='\0' 
-+               )
-+              {
-+               strcpy(pargs->class,argv[arg_count+1]);
-+               arg_count = arg_count+2;
-+	      }
-+            else 
-+	      {
-+	      arg_count++;
-+	      }
-+     }
-+   }
-+   if ( __DEBUG__ )
-+      announce("+++\nLeaving get_cmd_args\n+++\n");
-+   return( retval );
-+}
-+ 
-+/*--------------------------------------------------------------------
-  * GET_SEQUENCE
-  * 
-  * Get the next sequence from the input file (fasta format)
-@@ -628,50 +405,48 @@ char *sequence;     /* text of sequence
- }
- 
- /*--------------------------------------------------------------------
-- * LOOP_ON_SEQS - Loop through the sequences of the input file,
-- * doing the search and output.
-+ * BEST_PULL - Copy back the best score saved
-  * 
-- * Called by main.
-+ * Called by do_seq
+-best_pull(pargs,pbase,pstrand,pscore)
++int best_pull(pargs,pbase,pstrand,pscore)
+ struct arguments *pargs;  /* args from command line */
+ long *pbase;         /* base where score occurs */
+ int *pstrand;        /* strand where score occurs */
+--- libtfbs-perl.orig/blib/lib/pwm_searchPFF.c
++++ libtfbs-perl/blib/lib/pwm_searchPFF.c
+@@ -156,7 +156,7 @@
   * 
-- * Returns: 0 for success, -1 for failure.
-+ * Returns: 0 
+  * Returns: 0 
   *------------------------------------------------------------------*/
--int
--loop_on_seqs(pargs,pwm,fp, outfp)
-+best_pull(pargs,pbase,pstrand,pscore)
+-best_pull(pargs,pbase,pstrand,pscore)
++int best_pull(pargs,pbase,pstrand,pscore)
  struct arguments *pargs;  /* args from command line */
--double *pwm;         /* pwm, from get_matrix  */
--FILE *fp;            /* sequence file pointer */
--FILE *outfp;         /* output file pointer   */
-+long *pbase;         /* base where score occurs */
-+int *pstrand;        /* strand where score occurs */
-+double *pscore;      /* score of hit to pull back */
- {
--   char seq[SEQLEN+1];
--   char seqid[SEQNAMELEN+1];
--   int done = 0;
--   int retval=0;
--   if ( __DEBUG__ )
--      announce("+++\nEntering loop_on_seqs\n+++\n");
--
--   /* Main loop */
--   while ( !retval && !done )
-+   *pbase = pargs->best_base;
-+   if ( pargs->best_base >= 0 )
-    {
--      done = get_sequence(fp,seqid,seq);
--      if ( done == -1 )
--      {
--         err_log("LOOP_ON_SEQS:  get_sequence failed.");
--         retval = -1;
--      }
--      else if ( done == 0 )
--      {
--         if ( do_seq(pargs,pwm,seqid,seq,outfp) )
--         {
--            err_log("LOOP_ON_SEQS:  do_seq failed.");
--            retval = -1;
--         }
--      }
-+      *pscore = pargs->best_score;
-+      *pstrand = pargs->best_strand;
-    }
-+   return(0);
-+}
- 
--   if ( __DEBUG__ )
--      announce("+++\nLeaving loop_on_seqs\n+++\n");
-+/*--------------------------------------------------------------------
-+ * BEST_SAVE - Save the best score so far
-+ * 
-+ * Called by do_seq
-+ * 
-+ * Returns: 0 
-+ *------------------------------------------------------------------*/
-+int best_save(struct arguments* pargs, long base, int strand, double score)
-+     //struct arguments *pargs;  /* args from command line */
-+     //long base;           /* base where score occurs */
-+     //int strand;          /* strand where score occurs */
-+     //double score;        /* score of hit to save */
-+{
-+   if ( pargs->best_base < 0  ||  score > pargs->best_score )
-+   {
-+      pargs->best_base = base;
-+      pargs->best_score = score;
-+      pargs->best_strand = strand;
-+   }
- 
--   return (retval);
-+   return(0);
- }
- 
- /*--------------------------------------------------------------------
-@@ -754,32 +529,257 @@ FILE *outfp;
- }
- 
- /*--------------------------------------------------------------------
-- * SAVE_HIT - save location, strand and score of a hit in an array of such
-+ * DO_SEQ - Search through the given sequence with the given matrix
-  * 
-- * Called by do_seq.
-+ * Called by loop_on_seqs
+ long *pbase;         /* base where score occurs */
+ int *pstrand;        /* strand where score occurs */
+@@ -523,7 +523,7 @@
   * 
-  * Returns: 0 for success, -1 for failure.
+  * Return 0 normally, -1 on error, 1 if called at EOF.
   *------------------------------------------------------------------*/
- int
--save_hit(base,strand,score,hits,pnhit)
--long base;
--int strand;
--double score;
--struct HIT *hits;
--long *pnhit;
-+do_seq(pargs,pwm,seqid,seq,outfp)
-+struct arguments *pargs;  /* args from command line */
-+double *pwm;         /* pwm from get_matrix */
-+char *seqid;         /* id of sequence to work on */
-+char *seq;           /* the sequence to work on */
-+FILE *outfp;
- {
-+   double backward_score;
-+   double forward_score;
-+   double score;
-+   long base;
-+   int done = 0;
-+   int nt;
-+   int pos;
-    int retval = 0;
-+   int strand;
-+   long l;
-+   long nhit=0L;
-+   struct HIT hits[MAXHITS];
- 
--   if ( *pnhit == MAXHITS )
-+   if ( __DEBUG__ )
-+      announce("+++\nEntering do_seq.\n+++\n");
-+
-+   /* first make sure sequence is long enough */
-+   for ( base=0; base < pargs->width; ++base )
-    {
--      err_log("SAVE_HIT:  MAXHITS limit reached.");
--      retval = -1;
-+      if ( seq[base] == '\0' )
-+         done = 1;
-    }
- 
--   hits[*pnhit].base = base;
--   hits[*pnhit].strand = strand;
--   hits[*pnhit].score = score;
--   *pnhit = *pnhit + 1;
-+   /* loop on windows */
-+   pargs->best_base = -1;
-+   for ( base=0; !retval && !done && seq[base+pargs->width-1]; ++base )
-+   {
-+      forward_score = 0.0;
-+      backward_score = 0.0;
-+      for ( pos=0; pos<pargs->width; ++pos )
-+      {
-+         nt = TRANS[seq[base+pos]];
-+         forward_score += pwm[5*pos + nt];
-+         nt = ( nt==4 ) ? 4 : 3-nt;
-+         backward_score += pwm[5*(pargs->width - pos -1) + nt];
-+      }
-+      if ( forward_score > pargs->threshold )
-+      {
-+         if ( pargs->print_all )
-+         {
-+            if ( save_hit(base,0,forward_score,hits,&nhit) )
-+            {
-+               err_log("DO_SEQ:  save_hit failed");
-+               retval = -1;
-+            }
-+         }
-+         else if ( pargs->best_only )
-+         {
-+            best_save(pargs,base,0,forward_score);
-+         }
-+         else if ( output(pargs,seqid,base,seq,0,forward_score,outfp) )
-+         {
-+             err_log("DO_SEQ:  output failed");
-+             retval = -1;
-+         }
-+      }
-+      if ( backward_score > pargs->threshold )
-+      {
-+         if ( pargs->print_all )
-+         {
-+            if ( save_hit(base,1,backward_score,hits,&nhit) )
-+            {
-+               err_log("DO_SEQ:  save_hit failed");
-+               retval = -1;
-+            }
-+         }
-+         else if ( pargs->best_only )
-+         {
-+            best_save(pargs,base,1,backward_score);
-+         }
-+         else if ( output(pargs,seqid,base,seq,1,backward_score, outfp) )
-+         {
-+             err_log("DO_SEQ:  output failed");
-+             retval = -1;
-+         }
-+      }
-+      
-+   }
-+
-+   if ( pargs->print_all )
-+   {
-+      for ( l=0; l<nhit; ++l )
-+         printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
-+/*
-+      printf("# forward strand hits\n\n");
-+      for ( l=0; l<nhit; ++l )
-+      {
-+         if ( hits[l].strand == 0 )
-+            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
-+      }
-+      printf("\n# comp strand hits\n\n");
-+      for ( l=0; l<nhit; ++l )
-+      {
-+         if ( hits[l].strand == 1 )
-+            printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
-+      }
-+*/
-+   }
-+
-+   else
-+   {
-+      best_pull(pargs,&base,&strand,&score);
-+      if ( base>=0 )
-+      {
-+         if ( output(pargs,seqid,base,seq,strand,score,outfp) )
-+         {
-+             err_log("DO_SEQ:  output failed");
-+             retval = -1;
-+         }
-+      }
-+   }
-+ 
-+   if ( __DEBUG__ )
-+      announce("+++\nLeaving do_seq.\n+++\n");
- 
-    return(retval);
-+ 
-+}
-+
-+/*--------------------------------------------------------------------
-+ * LOOP_ON_SEQS - Loop through the sequences of the input file,
-+ * doing the search and output.
-+ * 
-+ * Called by main.
-+ * 
-+ * Returns: 0 for success, -1 for failure.
-+ *------------------------------------------------------------------*/
-+int
-+loop_on_seqs(pargs,pwm,fp, outfp)
-+struct arguments *pargs;  /* args from command line */
-+double *pwm;         /* pwm, from get_matrix  */
-+FILE *fp;            /* sequence file pointer */
-+FILE *outfp;         /* output file pointer   */
-+{
-+   char seq[SEQLEN+1];
-+   char seqid[SEQNAMELEN+1];
-+   int done = 0;
-+   int retval=0;
-+   if ( __DEBUG__ )
-+      announce("+++\nEntering loop_on_seqs\n+++\n");
-+
-+   /* Main loop */
-+   while ( !retval && !done )
-+   {
-+      done = get_sequence(fp,seqid,seq);
-+      if ( done == -1 )
-+      {
-+         err_log("LOOP_ON_SEQS:  get_sequence failed.");
-+         retval = -1;
-+      }
-+      else if ( done == 0 )
-+      {
-+         if ( do_seq(pargs,pwm,seqid,seq,outfp) )
-+         {
-+            err_log("LOOP_ON_SEQS:  do_seq failed.");
-+            retval = -1;
-+         }
-+      }
-+   }
-+
-+   if ( __DEBUG__ )
-+      announce("+++\nLeaving loop_on_seqs\n+++\n");
-+
-+   return (retval);
-+}
-+
-+int do_search(char* matrixfile, 
-+	      char* seqfile,
-+	      float threshold,
-+	      char* tfname,
-+	      char* tfclass,
-+	      char* outfile)
-+     /*was: main
-+       int argc;
-+       char **argv;*/
-+{
-+   double pwm[2*MAXCOUNTS];   /* for pwm matrix */
-+                              /* do own indexing; 5*pos + nt */
-+   int exitval = -1;          /* exit value from main */
-+   struct arguments args;          /* command line args */
-+   FILE *fp;                  /* for sequence input file */
-+   FILE *outfp;
-+   NUM_ERRS = 0;
-+    if (__DEBUG__) fprintf(stderr, "%s %s %f %s %s %s\n", matrixfile, seqfile, threshold, tfname, tfclass, outfile);
-+   if ( __DEBUG__ )
-+      announce("+++\nEntering main.\n+++\n");
-+
-+   /* Parse command line arguments */
-+   /*if ( get_cmd_args(argc,argv,&args) )
-+   {
-+      err_log(
-+      "Usage:  pwm_searchPFF pwm_file seq_file threshold [-a][-b]|[-m mask_file] [-n TFname] [-c TFclass]\n"
-+             );
-+	     }*/
-+
-+   strcpy(args.counts_file, matrixfile);
-+   strcpy(args.seq_file, seqfile);
-+   args.threshold = threshold;
-+   strcpy(args.name, tfname);
-+   strcpy(args.class, tfclass);
-+   args.print_all = 0;
-+   args.best_only= 0;
-+   /* Read in the pwm; calculate max/min score */
-+   //else 
-+   if ( get_matrix(&args,pwm) )
-+   {
-+      err_log("MAIN: get_matrix failed.");
-+   }
-+
-+   /* Open the sequence file */
-+   else if ( (fp=fopen(args.seq_file,"r")) == NULL )
-+   {
-+      err_log("MAIN: open_seq_file failed.");
-+   }
-+   else if ( (outfp=fopen(outfile,"w")) == NULL )
-+   {
-+      err_log("MAIN: open_outfile failed.");
-+   }
-+ 
-+   /* Loop on sequences */
-+   else if ( loop_on_seqs(&args,pwm,fp,outfp) )
-+   {
-+      err_log("MAIN:  loop_on_seqs failed.");
-+   }
-+
-+   /* Normal completion */
-+   else
-+   {
-+      exitval = 0;
-+   }
-+
-+   /* Clean up and close out */
-+   err_show();
-+   fclose(fp);
-+   fclose(outfp);
-+   if ( __DEBUG__ )
-+      announce("+++\nLeaving main.\n+++\n");
-+ 
-+   return(exitval);
- }
+-get_sequence(fp,seq_id,sequence)
++int get_sequence(fp,seq_id,sequence)
+ FILE *fp;           /* file to read */
+ char *seq_id;       /* name of sequence */
+ char *sequence;     /* text of sequence */


=====================================
debian/patches/series
=====================================
@@ -1,4 +1,5 @@
 hardening.patch
 configure.patch
 spelling-errors.patch
+dpkg-1.22.6.patch
 gcc-14.patch



View it on GitLab: https://salsa.debian.org/med-team/libtfbs-perl/-/compare/900413457b23cd55728fa9451d44b10d78ff2a77...710084b634d619dcc3e96d1700eb62be5454e6ca

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/med-team/libtfbs-perl/-/compare/900413457b23cd55728fa9451d44b10d78ff2a77...710084b634d619dcc3e96d1700eb62be5454e6ca
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240710/426c4872/attachment-0001.htm>


More information about the debian-med-commit mailing list