get multi-seg code ready; probably not working yet

This commit is contained in:
Heng Li
2017-09-24 15:17:17 -04:00
parent f0951141a1
commit a742f10164
3 changed files with 40 additions and 20 deletions
-12
View File
@@ -1,7 +1,6 @@
#include <zlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "bseq.h"
#include "kvec.h"
@@ -35,17 +34,6 @@ void mm_bseq_close(mm_bseq_file_t *fp)
free(fp);
}
static inline int mm_qname_same(const char *s1, const char *s2)
{
int l1, l2;
l1 = strlen(s1);
l2 = strlen(s2);
if (l1 != l2 || l1 < 3) return 0;
if (!(s1[l1-1] >= '1' && s1[l1-1] <= '2' && s1[l1-2] == '/')) return 0;
if (!(s2[l2-1] >= '1' && s2[l2-1] <= '2' && s2[l2-2] == '/')) return 0;
return (strncmp(s1, s2, l1 - 2) == 0);
}
static inline void kseq2bseq(kseq_t *ks, mm_bseq1_t *s, int with_qual)
{
s->name = strdup(ks->name.s);