simplified bwa_se() interface

This commit is contained in:
Heng Li 2012-04-08 00:12:34 -04:00
parent ca93a71e6e
commit 3b5a9e5595
2 changed files with 7 additions and 2 deletions

7
bwa.c
View File

@ -205,7 +205,7 @@ bwa_aln_t bwa_sa2aln(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, uint
return aln; return aln;
} }
bwa_one_t *bwa_se(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, int gen_cigar) bwa_one_t *bwa_se2(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, int gen_cigar)
{ {
bwa_one_t *one; bwa_one_t *one;
int best, cnt, i, seq_len; int best, cnt, i, seq_len;
@ -249,6 +249,11 @@ bwa_one_t *bwa_se(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, int gen
return one; return one;
} }
bwa_one_t *bwa_se(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq)
{
return bwa_se2(idx, buf, seq, 1);
}
void bwa_one_destroy(bwa_one_t *one) void bwa_one_destroy(bwa_one_t *one)
{ {
free(one->sai.sai); free(one->sai.sai);

2
bwa.h
View File

@ -91,7 +91,7 @@ extern "C" {
*/ */
bwa_aln_t bwa_sa2aln(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, uint64_t sa, int n_gaps); bwa_aln_t bwa_sa2aln(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, uint64_t sa, int n_gaps);
bwa_one_t *bwa_se(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq, int gen_cigar); bwa_one_t *bwa_se(const bwa_idx_t *idx, bwa_buf_t *buf, const char *seq);
void bwa_one_destroy(bwa_one_t *one); void bwa_one_destroy(bwa_one_t *one);