[med-svn] [Git][med-team/dazzdb][upstream] New upstream version 1.0+git20220426.8a55f0e

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Wed Jun 8 22:13:57 BST 2022



Étienne Mollier pushed to branch upstream at Debian Med / dazzdb


Commits:
1456d1fa by Étienne Mollier at 2022-06-08T22:39:59+02:00
New upstream version 1.0+git20220426.8a55f0e
- - - - -


8 changed files:

- DB.c
- DB.h
- DBmv.c
- DBrm.c
- Makefile
- README.md
- fasta2DAM.c
- simulator.c


Changes:

=====================================
DB.c
=====================================
@@ -495,7 +495,9 @@ DAZZ_STUB *Read_DB_Stub(char *path, int what)
 
   stub = Malloc(sizeof(DAZZ_STUB),"Allocating DB stub record");
   if (stub == NULL)
-    EXIT(NULL);
+    { fclose(dbfile);
+      EXIT(NULL);
+    }
 
   stub->nreads  = NULL;
   stub->fname   = NULL;
@@ -581,6 +583,7 @@ stub_trash:
   EPRINTF(EPLACE,"%s: Stub file %s is junk\n",Prog_Name,path);
 stub_error:
   Free_DB_Stub(stub);
+  fclose(dbfile);
   EXIT(NULL);
 }
 
@@ -621,6 +624,7 @@ int Fetch_Block_Range(char *path, int trim, int n, int *first, int *last)
       goto stub_error;
   if (fscanf(dbfile,DB_BDATA,&ulast,&tlast) != 2)
     goto stub_error;
+
   fclose(dbfile);
 
   if (trim)
@@ -635,6 +639,7 @@ int Fetch_Block_Range(char *path, int trim, int n, int *first, int *last)
   return (0);
 
 stub_error:
+  fclose(dbfile);
   EPRINTF(EPLACE,"%s: Stub file %s is junk\n",Prog_Name,path);
   EXIT(1);
 }
@@ -1639,6 +1644,7 @@ void Close_Arrow(DAZZ_DB *db)
 //     0: Track is for untrimmed DB
 //    -1: Track is not the right size of DB either trimmed or untrimmed
 //    -2: Could not find the track 
+//    -3: Error return (if INTERACTIVE mode only)
 
 int Check_Track(DAZZ_DB *db, char *track, int *kind)
 { FILE       *afile;
@@ -1658,12 +1664,14 @@ int Check_Track(DAZZ_DB *db, char *track, int *kind)
     return (-2);
 
   if (fread(&tracklen,sizeof(int),1,afile) != 1)
-    { fprintf(stderr,"%s: track files for %s are corrupted\n",Prog_Name,track);
-      exit (1);
+    { EPRINTF(EPLACE,"%s: track files for %s are corrupted\n",Prog_Name,track);
+      fclose(afile);
+      EXIT(-3);
     }
   if (fread(&size,sizeof(int),1,afile) != 1)
-    { fprintf(stderr,"%s: track files for %s are corrupted\n",Prog_Name,track);
-      exit (1);
+    { EPRINTF(EPLACE,"%s: track files for %s are corrupted\n",Prog_Name,track);
+      fclose(afile);
+      EXIT(-3);
     }
 
   if (size == 0)
@@ -1671,8 +1679,9 @@ int Check_Track(DAZZ_DB *db, char *track, int *kind)
   else if (size > 0)
     *kind = CUSTOM_TRACK;
   else
-    { fprintf(stderr,"%s: track files for %s are corrupted\n",Prog_Name,track);
-      exit (1);
+    { EPRINTF(EPLACE,"%s: track files for %s are corrupted\n",Prog_Name,track);
+      fclose(afile);
+      EXIT(-3);
     }
   
   fclose(afile);
@@ -2144,11 +2153,11 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
 #define EREAD(v,s,n,file,ret)                                                           \
   { if (fread(v,s,n,file) != (size_t) n)                                                \
       { if (ferror(file))                                                               \
-          fprintf(stderr,"%s: System error, read failed!\n",Prog_Name);       		\
+          EPRINTF(EPLACE,"%s: System error, read failed!\n",Prog_Name);       		\
         else if (ret)                                                                   \
           return (1);									\
         else										\
-          fprintf(stderr,"%s: The file %s is corrupted\n",Prog_Name,aname);		\
+          EPRINTF(EPLACE,"%s: The file %s is corrupted\n",Prog_Name,aname);		\
         EXIT(-1);									\
       }                                                                                 \
   }
@@ -2160,7 +2169,7 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
 
   if (extra == NULL)
     { if (fseeko(afile,slen+8*nelem,SEEK_CUR) < 0)
-        { fprintf(stderr,"%s: System error, read failed!\n",Prog_Name);
+        { EPRINTF(EPLACE,"%s: System error, read failed!\n",Prog_Name);
           EXIT(-1);
         }
       return (0);
@@ -2168,8 +2177,11 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
 
   name  = (char *) Malloc(slen+1,"Allocating extra name");
   value = Malloc(8*nelem,"Allocating extra value");
-  if (name == NULL || value == NULL)
-    EXIT(-1);
+  if (value == NULL || name == NULL)
+    { free(name);
+      free(value);
+      EXIT(-1);
+    }
 
   EREAD(name,1,slen,afile,0);
   EREAD(value,8,nelem,afile,0);
@@ -2185,22 +2197,23 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
     }
 
   if (vtype != extra->vtype)
-    { fprintf(stderr,"%s: Type of extra %s does not agree with previous .anno block files\n",
+    { EPRINTF(EPLACE,"%s: Type of extra %s does not agree with previous .anno block files\n",
                      Prog_Name,name);
       goto error;
     }
   if (nelem != extra->nelem)
-    { fprintf(stderr,"%s: Length of extra %s does not agree with previous .anno block files\n",
+    { EPRINTF(EPLACE,"%s: Length of extra %s does not agree with previous .anno block files\n",
                      Prog_Name,name);
       goto error;
     }
   if (accum != extra->accum)
-    { fprintf(stderr,"%s: Reduction indicator of extra %s does not agree with",Prog_Name,name);
-      fprintf(stderr," previos .anno block files\n");
+    { EPRINTF(EPLACE,
+           "%s: Reduction indicator of extra %s does not agree with previos .anno block files\n",
+           Prog_Name,name);
       goto error;
     }
   if (strcmp(name,extra->name) != 0)
-    { fprintf(stderr,"%s: Expecting extra %s in .anno block file, not %s\n",
+    { EPRINTF(EPLACE,"%s: Expecting extra %s in .anno block file, not %s\n",
                      Prog_Name,extra->name,name);
       goto error;
     }
@@ -2213,8 +2226,9 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
       if (accum == DB_EXACT)
         { for (j = 0; j < nelem; j++)
             if (eval[j] != ival[j])
-              { fprintf(stderr,"%s: Value of extra %s doe not agree",Prog_Name,name);
-                fprintf(stderr," with previous .anno block files\n");
+              { EPRINTF(EPLACE,
+                    "%s: Value of extra %s doe not agree with previous .anno block files\n",
+                    Prog_Name,name);
                 goto error;
               }
         }
@@ -2232,8 +2246,9 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
       if (accum == DB_EXACT)
         { for (j = 0; j < nelem; j++)
             if (eval[j] != ival[j])
-              { fprintf(stderr,"%s: Value of extra %s doe not agree",Prog_Name,name);
-                fprintf(stderr," with previous .anoo block files\n");
+              { EPRINTF(EPLACE,
+                    "%s: Value of extra %s doe not agree with previous .anno block files\n",
+                    Prog_Name,name);
                 goto error;
               }
         }
@@ -2250,7 +2265,7 @@ int Read_Extra(FILE *afile, char *aname, DAZZ_EXTRA *extra)
 error:
   free(value);
   free(name);
-  EXIT(1);
+  EXIT(-2);
 }
 
 //  Write extra record to end of file afile and advance write pointer
@@ -2685,8 +2700,8 @@ FILE *Next_Block_Arg(Block_Looper *e_parse)
 
   if (parse->isDB)
     { fprintf(stderr,"%s: Cannot open a DB block as a file (Next_Block_Arg)\n",Prog_Name);
-      exit (1);
-    }
+      exit (1);  //  exit even in interactive mode as this is a programming bug on
+    }            //   the part of the caller
 
   parse->next += 1;
   if (parse->next > parse->last)
@@ -2699,8 +2714,8 @@ FILE *Next_Block_Arg(Block_Looper *e_parse)
 
   if ((input = fopen(MyCatenate(parse->pwd,"/",disp,".las"),"r")) == NULL)
     { if (parse->last != INT_MAX)
-        { fprintf(stderr,"%s: %s.las is not present\n",Prog_Name,disp);
-          exit (1);
+        { EPRINTF(EPLACE,"%s: %s.las is not present\n",Prog_Name,disp);
+          EXIT(NULL);
         }
       return (NULL);
     }
@@ -2767,7 +2782,7 @@ char *Next_Block_Slice(Block_Looper *e_parse, int slice)
     { int size = strlen(parse->pwd) + strlen(Block_Arg_Root(parse)) + 30;
       parse->slice =  (char *)  Malloc(size,"Block argument slice");
       if (parse->slice == NULL)
-        exit (1);
+        EXIT(NULL);
     }
 
   if (parse->next+1 > parse->last)
@@ -2807,16 +2822,16 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
   else
     root  = Root(arg,".las");
   if (parse == NULL || pwd == NULL || root == NULL)
-    exit (1);
+    goto error;
 
   ppnt = index(root,BLOCK_SYMBOL);
   if (ppnt == NULL)
     first = last = -1;
   else
     { if (index(ppnt+1,BLOCK_SYMBOL) != NULL)
-        { fprintf(stderr,"%s: Two or more occurences of %c-sign in source name '%s'\n",
+        { EPRINTF(EPLACE,"%s: Two or more occurences of %c-sign in source name '%s'\n",
                          Prog_Name,BLOCK_SYMBOL,root);
-          exit (1);
+          goto error;
         }
       *ppnt++ = '\0';
       first = strtol(ppnt,&cpnt,10);
@@ -2826,24 +2841,24 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
         }
       else
         { if (first < 1)
-            { fprintf(stderr,
+            { EPRINTF(EPLACE,
                       "%s: Integer following %c-sigan is less than 1 in source name '%s'\n",
                       Prog_Name,BLOCK_SYMBOL,root);
-              exit (1);
+              goto error;
             }
           if (*cpnt == '-')
             { ppnt = cpnt+1;
               last = strtol(ppnt,&cpnt,10);
               if (cpnt == ppnt)
-                { fprintf(stderr,"%s: Second integer must follow - in source name '%s'\n",
+                { EPRINTF(EPLACE,"%s: Second integer must follow - in source name '%s'\n",
                                  Prog_Name,root);
-                  exit (1);
+                  goto error;
                 }
               if (last < first)
-                { fprintf(stderr,
+                { EPRINTF(EPLACE,
                           "%s: 2nd integer is less than 1st integer in source name '%s'\n",
                           Prog_Name,root);
-                  exit (1);
+                  goto error;
                 }
               ppnt = cpnt;
             }
@@ -2875,8 +2890,8 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
         { dbname = MyCatenate(pwd,"/",root,"dam"); 
           dbfile = fopen(dbname,"r");
           if (dbfile == NULL)
-            { fprintf(stderr,"%s: Cannot open database %s[db|dam]\n",Prog_Name,root);
-              exit (1);
+            { EPRINTF(EPLACE,"%s: Cannot open database %s[db|dam]\n",Prog_Name,root);
+              goto error;
             }
         }
 
@@ -2893,6 +2908,12 @@ static Block_Looper *parse_block_arg(char *arg, int isDB)
     }
 
   return ((Block_Looper *) parse);
+
+error:
+  free(parse);
+  free(root);
+  free(pwd);
+  EXIT(NULL);
 }
 
 Block_Looper *Parse_Block_LAS_Arg(char *arg)


=====================================
DB.h
=====================================
@@ -596,6 +596,7 @@ void Close_Arrow(DAZZ_DB *);
   //     0: Track is for untrimmed DB
   //    -1: Track is not the right size of DB either trimmed or untrimmed
   //    -2: Could not find the track
+  //    -3: Error return (if INTERACTIVE mode only)
   // In addition, if opened (0 or 1 returned), then kind points at an integer indicating
   //   the type of track as follows:
   //      CUSTOM  0 => a custom track
@@ -705,7 +706,7 @@ void Close_QVs(DAZZ_DB *db);
   //   Take a command line argument and interpret the '@' block number ranges.
   //   Parse_Block_[LAS,DB]_Arg produces a Block_Looper iterator object that can then
   //   be invoked multiple times to iterate through all the file names implied by
-  //   the @ pattern/range.  Next_Block_Slice returns a string encoing the next
+  //   the @ pattern/range.  Next_Block_Slice returns a string encoding the next
   //   slice files represented by an @-notation, and advances the iterator by
   //   that many files.
 


=====================================
DBmv.c
=====================================
@@ -14,64 +14,104 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/stat.h>
 
 #include "DB.h"
 
-static char *Usage = "[-v] <old:db|dam> <new:db|dam>";
+static char *Usage = "[-vinf] <old:db|dam> <new:db|dam|dir>";
 
 static int   VERBOSE;
+static int   INQUIRE;
+static int   NOXFER;
+static int   FORCE;
+
+static char *op;
+static char  com[10];
+static char *verb;
+
 static char *nroot;
 static char *npath;
 
   //  We assume this program uses so little code that memory allocation checks are unecessary
 
-static char *Catenate5(char *path, char *sep1, char *root, char *sep2, char *suffix)
+static void HANDLER(char *path, char *exten)
 { static char *cat = NULL;
   static int   max = -1;
-  int len;
+  int   len;
+  char *r;
 
-  len = strlen(path) + strlen(sep1) + strlen(root) + strlen(sep2) + strlen(suffix);
+  len = strlen(path) + strlen(npath) + strlen(nroot) + strlen(exten) + 50;
   if (len > max)
     { max = ((int) (1.2*len)) + 100;
       cat = (char *) realloc(cat,max+1);
     }
-  sprintf(cat,"%s%s%s%s%s",path,sep1,root,sep2,suffix);
-  return (cat);
-}
 
-static void HANDLER(char *path, char *exten)
-{ char *r, *n;
-  
   r = Root(path,"");
   if (*r == '.')
-    n = Catenate5(npath,"/.",nroot,".",exten);
+    { sprintf(cat,"%s %s %s/.%s.%s",com,path,npath,nroot,exten);
+      if (VERBOSE)
+        fprintf(stderr,"  %s %s to %s/.%s.%s\n",verb,path,npath,nroot,exten);
+    }
   else
-    n = Catenate5(npath,"/",nroot,".",exten);
-  if (rename(path,n) != 0)
-    fprintf(stderr,"%s: [WARNING] Couldn't rename file %s\n",Prog_Name,r);
-  else if (VERBOSE)
-    fprintf(stderr,"  Moving %s to %s\n",path,n);
+    { sprintf(cat,"%s %s %s/%s.%s",com,path,npath,nroot,exten);
+      if (VERBOSE)
+        fprintf(stderr,"  %s %s to %s/%s.%s\n",verb,path,npath,nroot,exten);
+    }
+  system(cat);
   free(r);
 }
 
+static int check(char *path, char *root)
+{ int state;
+  struct stat B;
+
+  state = 0;
+  if (stat(Catenate(path,"/",root,".db"),&B) == 0)
+    state += 1;
+  if (stat(Catenate(path,"/",root,".dam"),&B) == 0)
+    state += 2;
+  if (state == 3)
+    { fprintf(stderr,"%s: %s refers to both a dam and a db ??\n",Prog_Name,root);
+      exit (1);
+    }
+  return (state);
+}
+
 int main(int argc, char *argv[])
-{
+{ char *opath;
+  char *oroot;
+  int   otype,  ntype;
+  struct stat B;
+
   //  Process arguments
 
   { int  i, j, k;
     int  flags[128];
 
+#ifdef MOVE
     ARG_INIT("DBmv")
+    op = "mv";
+    verb = "Moving";
+#else
+    ARG_INIT("DBcp")
+    op = "cp";
+    verb = "Copying";
+#endif
 
     j = 1;
     for (i = 1; i < argc; i++)
       if (argv[i][0] == '-')
-        { ARG_FLAGS("v") }
+        { ARG_FLAGS("vinf") }
       else
         argv[j++] = argv[i];
     argc = j;
 
     VERBOSE = flags['v'];
+    INQUIRE = flags['i'];
+    NOXFER  = flags['n'];
+    FORCE   = flags['f'];
 
     if (argc != 3)
       { fprintf(stderr,"Usage: %s %s\n",Prog_Name,Usage);
@@ -79,13 +119,41 @@ int main(int argc, char *argv[])
       }
   }
 
-  if (strcmp(argv[1]+(strlen(argv[1])-4),".dam") == 0)
-    nroot = Root(argv[2],".dam");
+  if (INQUIRE | NOXFER | FORCE)
+    sprintf(com,"%s -%s%s%s",op,INQUIRE?"i":"",NOXFER?"n":"",FORCE?"f":"");
+  else
+    sprintf(com,"%s",op);
+
+  opath = PathTo(argv[1]);
+  if (strcmp(argv[1]+(strlen(argv[1])-3),".db") == 0)
+    oroot = Root(argv[1],".db");
+  else
+    oroot = Root(argv[1],".dam");
+  otype = check(opath,oroot);
+  if (otype == 0)
+    { fprintf(stderr,"%s: %s doesn't refer to a db or a dam\n",Prog_Name,oroot);
+      exit (1);
+    }
+
+  if (stat(argv[2],&B) == 0 && (B.st_mode & S_IFMT) == S_IFDIR)
+    { npath = argv[2];
+      nroot = oroot;
+      ntype = otype;
+    }
   else
-    nroot = Root(argv[2],".db");
-  npath = PathTo(argv[2]);
+    { npath = PathTo(argv[2]);
+      if (strcmp(argv[1]+(strlen(argv[1])-4),".db") == 0)
+        nroot = Root(argv[2],".db");
+      else
+        nroot = Root(argv[2],".dam");
+      ntype = check(npath,nroot);
+      if (ntype != 0 && ntype != otype)
+        { fprintf(stderr,"%s: one of %s and %s is a db, the other a dam ??\n",
+                         Prog_Name,oroot,nroot);
+          exit (1);
+        }
+    }
 
-printf(" From = '%s'\n",argv[1]);
   if (List_DB_Files(argv[1],HANDLER) < 0)
     { fprintf(stderr,"%s: Could not find database %s\n",Prog_Name,argv[1]);
       exit (1);


=====================================
DBrm.c
=====================================
@@ -17,16 +17,30 @@
 
 #include "DB.h"
 
-static char *Usage = "[-v] <path:db|dam> ... ";
+static char *Usage = "[-vnf] <path:db|dam> ... ";
 
 static int VERBOSE;
+static int NODEL;
+static int FORCE;
+
+static char com[10];
 
 static void HANDLER(char *path, char *exten)
-{ (void) exten;
-  if (unlink(path) != 0)
-    fprintf(stderr,"%s: [WARNING] Couldn't delete file %s\n",Prog_Name,path);
-  else if (VERBOSE)
+{ static char *cat = NULL;
+  static int   max = -1;
+  int   len;
+
+  (void) exten;
+
+  len = strlen(path) + 50;
+  if (len > max)
+    { max = ((int) (1.2*len)) + 100;
+      cat = (char *) realloc(cat,max+1);
+    }
+  sprintf(cat,"%s %s",com,path);
+  if (VERBOSE)
     fprintf(stderr,"  Deleting %s\n",path);
+  system(cat);
 }
 
 int main(int argc, char *argv[])
@@ -41,12 +55,14 @@ int main(int argc, char *argv[])
     j = 1;
     for (i = 1; i < argc; i++)
       if (argv[i][0] == '-')
-        { ARG_FLAGS("v") }
+        { ARG_FLAGS("vnf") }
       else
         argv[j++] = argv[i];
     argc = j;
 
     VERBOSE = flags['v'];
+    NODEL   = flags['n'];
+    FORCE   = flags['f'];
 
     if (argc <= 1)
       { fprintf(stderr,"Usage: %s %s\n",Prog_Name,Usage);
@@ -54,6 +70,11 @@ int main(int argc, char *argv[])
       }
   }
 
+  if (NODEL | FORCE)
+    sprintf(com,"rm -%s%s",NODEL?"n":"",FORCE?"f":"");
+  else
+    sprintf(com,"rm");
+
   { int i;
 
     for (i = 1; i < argc; i++)


=====================================
Makefile
=====================================
@@ -2,7 +2,7 @@ DEST_DIR = ~/bin
 
 CFLAGS = -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing
 
-ALL = fasta2DB DB2fasta quiva2DB DB2quiva DBsplit DBdust Catrack DBshow DBstats DBrm DBmv \
+ALL = fasta2DB DB2fasta quiva2DB DB2quiva DBsplit DBdust Catrack DBshow DBstats DBrm DBmv DBcp \
       simulator fasta2DAM DAM2fasta DBdump rangen arrow2DB DB2arrow DBwipe DBtrim DBa2b DBb2a
 
 all: $(ALL)
@@ -50,7 +50,10 @@ DBrm: DBrm.c DB.c DB.h QV.c QV.h
 	gcc $(CFLAGS) -o DBrm DBrm.c DB.c QV.c -lm
 
 DBmv: DBmv.c DB.c DB.h QV.c QV.h
-	gcc $(CFLAGS) -o DBmv DBmv.c DB.c QV.c -lm
+	gcc $(CFLAGS) -DMOVE -o DBmv DBmv.c DB.c QV.c -lm
+
+DBcp: DBmv.c DB.c DB.h QV.c QV.h
+	gcc $(CFLAGS) -o DBcp DBmv.c DB.c QV.c -lm
 
 simulator: simulator.c DB.c DB.h QV.c QV.h
 	gcc $(CFLAGS) -o simulator simulator.c DB.c QV.c -lm


=====================================
README.md
=====================================
@@ -464,23 +464,35 @@ intervals along the read can be specified with the -m option in which case a sum
 and a histogram of the interval lengths is displayed.
 
 ```
-17. DBrm [-v] <path:db|dam> ...
+17. DBrm [-vnf] <path:db|dam> ...
 ```
 
 Delete all the files for the given data bases.  Do not use rm to remove a database, as
 there are at least two and often several secondary files for each DB including track
 files, and all of these are removed by DBrm.
 If the -v option is set then every file deleted is listed.
+The -n, and -f options are as for the UNIX "rm" command.
 
 ```
-18. DBmv [-v] <old:db|dam> <new:db|dam>
+18. DBmv [-vinf] <old:db|dam> <new:db|dam|dir>
 ```
 
-Rename all the files for the data base old to use the new root.
+If \<new> is a directory then all the files for \<old> are moved
+to the diretory, otherwise, all the files for \<old> are renamed to the given target name.
 If the -v option is set then every file move is displayed.
+The -i, -n, and -f options are as for the UNIX "mv" command.
 
 ```
-19. DBwipe <path:db|dam>
+19. DBcp [-vinf] <old:db|dam> <new:db|dam|dir>
+```
+
+If \<new> is a directory then all the files for \<old> are copied
+to the diretory, otherwise, a copy of all the files for \<old> are created with the given target name.
+If the -v option is set then every file move is displayed.
+The -i, -n, and -f options are as for the UNIX "cp" command.
+
+```
+20. DBwipe <path:db|dam>
 ```
 
 Delete any Arrow or Quiver data from the given databases.  This removes the .arw or
@@ -488,7 +500,7 @@ Delete any Arrow or Quiver data from the given databases.  This removes the .arw
 or Quiver.  Basically, converts an A-DB or Q-DB back to a simple S-DB.
 
 ```
-20.  simulator <genome:dam> [-CU] [-m<int(10000)>] [-s<int(2000)>] [-e<double(.15)]
+21.  simulator <genome:dam> [-CU] [-m<int(10000)>] [-s<int(2000)>] [-e<double(.15)]
                                   [-c<double(50.)>] [-f<double(.5)>] [-x<int(4000)>]
                                   [-w<int(80)>] [-r<int>] [-M<file>]
 ```
@@ -523,7 +535,7 @@ a read is say 's b e' then if b \< e the read is a perturbed copy of s[b,e] in t
 forward direction, and a perturbed copy s[e,b] in the reverse direction otherwise.
 
 ```
-21. rangen <genlen:double> [-U] [-b<double(.5)>] [-w<int(80)>] [-r<int>]
+22. rangen <genlen:double> [-U] [-b<double(.5)>] [-w<int(80)>] [-r<int>]
 ```
 
 Generate a random DNA sequence of length genlen*1Mbp that has an AT-bias of -b.


=====================================
fasta2DAM.c
=====================================
@@ -487,7 +487,7 @@ int main(int argc, char *argv[])
                     if (number[(int) read[++i]] < 4)
                       break;
 
-                  if (i >= rlen) break;
+                  // if (i >= rlen) break;
 
                   pbeg = i;
                   prec.fpulse = pbeg;


=====================================
simulator.c
=====================================
@@ -363,7 +363,7 @@ static void shotgun(DAZZ_DB *source, int nscaffs)
       double uni;
       char  *s, *t;
 
-      scf = bin_search(nscaffs,weights,drand48()) - 1;   //  Pick a scaffold with probabilitye
+      scf = bin_search(nscaffs,weights,drand48()) - 1;   //  Pick a scaffold with probability
                                                          //    proportional to its length
 
       uni = drand48();



View it on GitLab: https://salsa.debian.org/med-team/dazzdb/-/commit/1456d1fad11bbd473ec4d8279bdeed0d28347a79

-- 
View it on GitLab: https://salsa.debian.org/med-team/dazzdb/-/commit/1456d1fad11bbd473ec4d8279bdeed0d28347a79
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/20220608/48ee0c0b/attachment-0001.htm>


More information about the debian-med-commit mailing list