Loading include/fileio.h +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading include/segemehl.h +2 −1 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ typedef struct segemehl_s { */ merge_t *merge; char orientation; char fullname; } segemehl_t; typedef struct checkthread_s { Loading Loading @@ -387,6 +387,7 @@ se_setdefault(segemehl_t *info) { info->bamhdr = NULL; info->head = NULL; info->orientation = 1; info->fullname = 0; } inline static void Loading include/version.h +3 −3 Original line number Diff line number Diff line Loading @@ -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" include/version.h.bak +2 −2 Original line number Diff line number Diff line Loading @@ -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" libs/alignment.c +27 −12 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; } Loading @@ -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) { Loading Loading @@ -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 Loading
include/fileio.h +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading
include/segemehl.h +2 −1 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ typedef struct segemehl_s { */ merge_t *merge; char orientation; char fullname; } segemehl_t; typedef struct checkthread_s { Loading Loading @@ -387,6 +387,7 @@ se_setdefault(segemehl_t *info) { info->bamhdr = NULL; info->head = NULL; info->orientation = 1; info->fullname = 0; } inline static void Loading
include/version.h +3 −3 Original line number Diff line number Diff line Loading @@ -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"
include/version.h.bak +2 −2 Original line number Diff line number Diff line Loading @@ -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"
libs/alignment.c +27 −12 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; } Loading @@ -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) { Loading Loading @@ -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