Skip to content

Commit

Permalink
r413: dealing with another type of folded inv aln
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Dec 14, 2020
1 parent fa48278 commit bc1ea70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions asm-call.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ void mg_call_asm(const gfa_t *g, int32_t n_seq, const mg_bseq1_t *seq, mg_gchain
else if (ca[gt->lc[st-1].v>>1].bid > ca[gt->lc[en].v>>1].bid)
strand = -1;
else {
assert(ca[gt->lc[st-1].v>>1].is_src + ca[gt->lc[en].v>>1].is_src == 1);
if (ca[gt->lc[st-1].v>>1].is_src + ca[gt->lc[en].v>>1].is_src != 1) {
fprintf(stderr, "[W::%s] type-1 folded inversion alignment around %c%s <=> %s:%d-%d\n",
__func__, "><"[gt->lc[st].v&1], g->seg[gt->lc[st].v>>1].name, seq[t].name, qs, qe);
continue;
}
if (ca[gt->lc[st-1].v>>1].is_src) strand = 1;
else strand = -1;
}
Expand All @@ -99,7 +103,7 @@ void mg_call_asm(const gfa_t *g, int32_t n_seq, const mg_bseq1_t *seq, mg_gchain
if (ca[gt->lc[k].v>>1].bid != bid)
break;
if (k != en) { // this may happen around an inversion towards the end of an alignment chain
fprintf(stderr, "[W::%s] folded inversion alignment around %c%s <=> %s:%d-%d\n",
fprintf(stderr, "[W::%s] type-2 folded inversion alignment around %c%s <=> %s:%d-%d\n",
__func__, "><"[gt->lc[st].v&1], g->seg[gt->lc[st].v>>1].name, seq[t].name, qs, qe);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion minigraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdint.h>
#include "gfa.h"

#define MG_VERSION "0.13-r412-dirty"
#define MG_VERSION "0.13-r413-dirty"

#define MG_M_SPLICE 0x10
#define MG_M_SR 0x20
Expand Down

0 comments on commit bc1ea70

Please sign in to comment.