Commit ea4ce368 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 0.3.4

parent c43e3da4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
#include "stringutils.h"
char * bl_getTempFile(char *path, char *tmp);
int bl_UnixSort(void *space, char *filename, const char *fieldstring, const char delim);
char* readfile(void *, char *, Uint*);
char* readfile(void *, char *, size_t*);
stringset_t **readcsv(void *, char *, char*, Uint *);
void writeY(char *, double  *, Uint, Uint, Uint);
void writeXYUint(char *filename, Uint *X, Uint *Y, Uint len);
+2 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ typedef struct segemehl_s {
    */
    merge_t *merge;
    char orientation;
 
    char fullname;
} segemehl_t;

typedef struct checkthread_s {
@@ -387,6 +387,7 @@ se_setdefault(segemehl_t *info) {
  info->bamhdr = NULL;
  info->head = NULL;
  info->orientation = 1;
  info->fullname = 0;
}

inline static void
+3 −3
Original line number Diff line number Diff line
@@ -24,11 +24,11 @@



#define VERSION "0.3.2"
#define VERSION "0.3.4"

#define REVISION "g664b3dd"
#define REVISION "ge5dee47"

#define TIME "2018-11-11 17:18:49 +0100"
#define TIME "2018-12-25 20:39:07 +0100"


+2 −2
Original line number Diff line number Diff line
@@ -12,6 +12,6 @@


#define VERSION "v0.3.0"
#define REVISION "g664b3dd"
#define TIME "2018-11-11 17:18:49 +0100"
#define REVISION "ge5dee47"
#define TIME "2018-12-25 20:39:07 +0100"
+27 −12
Original line number Diff line number Diff line
@@ -1252,7 +1252,7 @@ bl_mdGetDiffString(char *MD) {

char*
cigarstring(Alignment *al, Uint leftclip, Uint rightclip, char clipch, unsigned char rev, char brief) {
  Uint i, j, k, q=0, p=0, cur=0, strsize, steps, msteps;
  Uint i, j, k, q=0, p=0, cur=0, strsize, steps=0, msteps;
  char *cigarstr;
  char eopc=0;

@@ -1266,10 +1266,9 @@ cigarstring(Alignment *al, Uint leftclip, Uint rightclip, char clipch, unsigned
    cur+=strsize;
  }

  for(k=0; k < al->numofmeops; k++) {
  for(steps=0, k=0; k < al->numofmeops; k++) {
    i = (rev) ? al->numofmeops - k - 1 : k;
    //if Replacement occured 
    steps=0;
    if (al->meops[i].eop == Replacement) {
      //iter over all steps
      msteps=0;
@@ -1299,7 +1298,7 @@ cigarstring(Alignment *al, Uint leftclip, Uint rightclip, char clipch, unsigned
        msteps++;
      }

      steps = msteps;
      steps += msteps;
      //set string ptrs
      p+=j;
      q+=j;
@@ -1311,7 +1310,8 @@ cigarstring(Alignment *al, Uint leftclip, Uint rightclip, char clipch, unsigned
      else
        eopc = '=';
      //set ptrs
      steps = al->meops[i].steps;
      //steps = al->meops[i].steps;
      steps += al->meops[i].steps;
      p+=steps;
      q+=steps;
    }
@@ -1322,11 +1322,22 @@ cigarstring(Alignment *al, Uint leftclip, Uint rightclip, char clipch, unsigned
      else
        eopc = 'X';
      //set ptrs
      steps = al->meops[i].steps;
      //steps = al->meops[i].steps;
      steps += al->meops[i].steps;
      p+=steps;
      q+=steps;
    }

    //dump previous matches and mismatches if in brief mode
    //if a different operation is coming
    if(brief && steps && eopc == 'M' && 
        al->meops[i].eop != Match && al->meops[i].eop != Mismatch) {
      
      strsize = snprintf(NULL, 0, "%d", steps)+1;
      sprintf(&cigarstr[cur], "%d%c", steps, eopc);
      cur+=strsize;
      steps = 0;
    }

    //if deletion occured
    if (al->meops[i].eop == Deletion) {
@@ -1355,11 +1366,15 @@ cigarstring(Alignment *al, Uint leftclip, Uint rightclip, char clipch, unsigned
      //     p+=steps; no moves!
    }


    //dump everything except "M"s in the brief mode
    //unless we are at the end
    if(eopc != 'M' || k+1 == al->numofmeops) {
      //strsize = floor(log(steps)/log(10))+2;
      strsize = snprintf(NULL, 0, "%d", steps)+1;
      sprintf(&cigarstr[cur], "%d%c", steps, eopc);
      cur+=strsize;
      steps = 0;
    }
  }

  if(rightclip || (leftclip && rev)) {
Loading