[med-svn] [Git][med-team/daligner][upstream] New upstream version 1.0+git20200727.ed40ce5

Steffen Möller gitlab at salsa.debian.org
Mon Aug 10 15:02:56 BST 2020



Steffen Möller pushed to branch upstream at Debian Med / daligner


Commits:
02bb795f by Steffen Moeller at 2020-08-10T16:01:40+02:00
New upstream version 1.0+git20200727.ed40ce5
- - - - -


4 changed files:

- LAsort.c
- daligner.c
- filter.c
- filter.h


Changes:

=====================================
LAsort.c
=====================================
@@ -284,10 +284,10 @@ int main(int argc, char *argv[])
               exit (1);
 
             if (fwrite(&novl,sizeof(int64),1,foutput) != 1)
-              SYSTEM_READ_ERROR
+              SYSTEM_WRITE_ERROR
             if (fwrite(&tspace,sizeof(int),1,foutput) != 1)
-              SYSTEM_READ_ERROR
-    
+              SYSTEM_WRITE_ERROR
+ 
             if (size > isize)
               { if (iblock == NULL)
                   iblock = Malloc(size+ptrsize,"Allocating LAsort input block");
@@ -309,6 +309,11 @@ int main(int argc, char *argv[])
             free(root);
             free(path);
           }
+
+          if (novl == 0)
+            { fclose(foutput);
+              continue;
+            }
     
           //  Set up unsorted permutation array
         
@@ -337,7 +342,7 @@ int main(int argc, char *argv[])
                 sov = novl;
               }
           }
-    
+
           //  Sort permutation array of ptrs to records
     
           IBLOCK = iblock;
@@ -370,7 +375,9 @@ int main(int argc, char *argv[])
                         fptr = fblock;
                       }
                     if (equal)
-                      fptr += (ovlsize + tsize);
+                      { fptr += (ovlsize + tsize);
+                        novl -= 1;
+                      }
                     else
                       { memmove(fptr,((char *) w)+ptrsize,ovlsize);
                         fptr += ovlsize;
@@ -388,12 +395,15 @@ int main(int argc, char *argv[])
               }
           }
 
+          rewind(foutput);
+          if (fwrite(&novl,sizeof(int64),1,foutput) != 1)
+            SYSTEM_WRITE_ERROR
+
           free(perm);
           fclose(foutput);
         }
       Free_Block_Arg(parse);
     }
-
     
   if (iblock != NULL)
     free(iblock - ptrsize);


=====================================
daligner.c
=====================================
@@ -40,6 +40,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
+#include <sys/resource.h>
 
 #include <sys/param.h>
 #if defined(BSD)
@@ -470,6 +471,12 @@ int main(int argc, char *argv[])
   int    NTHREADS;
   int    MAP_ORDER;
 
+#ifdef PROFILE
+  struct rusage stime, etime;
+
+  getrusage(RUSAGE_SELF, &stime);
+#endif
+
   { int    i, j, k;
     int    flags[128];
     char  *eptr;
@@ -728,7 +735,24 @@ int main(int argc, char *argv[])
   Close_DB(ablock);
   free(apath);
   free(aroot);
-  Clean_Exit(0);
 
+#ifdef PROFILE
+  { int64 secs, mics;
+
+    getrusage(RUSAGE_SELF, &etime);
+
+    secs  = etime.ru_utime.tv_sec  - stime.ru_utime.tv_sec;
+    mics  = etime.ru_utime.tv_usec - stime.ru_utime.tv_usec;
+    mics += 1000000*secs;
+
+    secs  = etime.ru_stime.tv_sec  - stime.ru_stime.tv_sec;
+    mics += etime.ru_stime.tv_usec - stime.ru_stime.tv_usec;
+    mics += 1000000*secs;
+
+    printf("T %lld\n",mics/1000);
+  }
+#endif
+
+  Clean_Exit(0);
   exit (0);
 }


=====================================
filter.c
=====================================
@@ -28,7 +28,7 @@
 #include "filter.h"
 #include "align.h"
 
-#undef  PROFILE        //  WHen running sensitivity trials, compute histogram of
+                       //  WHen running sensitivity trials, compute histogram of
 #define MAXHIT   1000  //    false & true positive hit scores
 
   //  Debug Controls
@@ -2521,7 +2521,7 @@ void Match_Filter(char *aname, DAZZ_DB *ablock, char *bname, DAZZ_DB *bblock,
   }
 #endif
 
-  { int  max_diag  = ((ablock->maxlen >> Binshift) - ((-bblock->maxlen) >> Binshift)) + 1;
+  { int  max_diag  = ((ablock->maxlen >> Binshift) - ((-bblock->maxlen) >> Binshift)) + 3;
     int *space;
     int  i;
 
@@ -2556,7 +2556,7 @@ void Match_Filter(char *aname, DAZZ_DB *ablock, char *bname, DAZZ_DB *bblock,
       space[i] = 0;
     for (i = 0; i < NTHREADS; i++)
       { if (i == 0)
-          parmr[i].score = space - ((-bblock->maxlen) >> Binshift);
+          parmr[i].score = space - (((-bblock->maxlen) >> Binshift) - 1);
         else
           parmr[i].score = parmr[i-1].lasta + max_diag;
         parmr[i].lastp = parmr[i].score + max_diag;


=====================================
filter.h
=====================================
@@ -14,6 +14,8 @@
 #include "DB.h"
 #include "align.h"
 
+#undef PROFILE
+
 extern int    VERBOSE;      //  -v flag is set?
 extern int    MINOVER;      //  minimum overlap (-l)
 extern int    HGAP_MIN;     //  HGap minimum (-H)



View it on GitLab: https://salsa.debian.org/med-team/daligner/-/commit/02bb795fe643ed8788eba5147924c38e3c972403

-- 
View it on GitLab: https://salsa.debian.org/med-team/daligner/-/commit/02bb795fe643ed8788eba5147924c38e3c972403
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/20200810/7708f230/attachment-0001.html>


More information about the debian-med-commit mailing list