Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Dec 16, 2024
1 parent 603d1bd commit 1169600
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion bwapy/libbwapy.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cdef extern from "bntseq.h":

cdef extern from "kseq.h":
ctypedef struct kstring_t:
pass
char *s

cdef extern from "bwase.h":
void bwa_aln2seq_core(int n_aln, const bwt_aln1_t *aln, bwa_seq_t *s, int set_main, int n_multi)
Expand Down Expand Up @@ -110,6 +110,8 @@ cdef extern from "bwtaln.h":
int n_cigar
int tid
uint32_t full_len
uint32_t nm
char *md


void bwa_free_read_seq(int n_seqs, bwa_seq_t *seqs)
Expand Down
6 changes: 3 additions & 3 deletions bwapy/libbwapy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,8 @@ cdef class BwaAln:
# # tags
if seq.type != BWA_TYPE_NO_MATCH:
attrs = dict()
# attrs["MD"] = bwa_cal_md1(seq.n_cigar, seq.cigar, seq.len, seq.pos,
# seq.rseq if seq.strand else seq.seq, self._index._bns.l_pac,
# self._pacseq, kstr, &nm)
attrs["MD"] = f"{seq.md}"
attrs["NM"] = f"{seq.nm}"
rec.set_tags(list(attrs.items()))
# # TODO:the custom bwa tags: XT, NM, XN, SM, AM, X0, X1, XM, XO, XG, XA, HN

Expand Down Expand Up @@ -348,6 +347,7 @@ cdef class BwaAln:
]

bwa_free_read_seq(num_seqs, seqs)
free(kstr.s)
free(kstr)

return recs
Expand Down

0 comments on commit 1169600

Please sign in to comment.