31 lines
723 B
C
31 lines
723 B
C
|
|
#ifndef COMMON_H_
|
|||
|
|
#define COMMON_H_
|
|||
|
|
|
|||
|
|
#include <stdlib.h>
|
|||
|
|
#include <stdint.h>
|
|||
|
|
|
|||
|
|
typedef uint64_t bwtint_t;
|
|||
|
|
|
|||
|
|
#define xassert(cond, msg) \
|
|||
|
|
if ((cond) == 0) \
|
|||
|
|
_err_fatal_simple_core(__func__, msg)
|
|||
|
|
|
|||
|
|
double realtime(void);
|
|||
|
|
|
|||
|
|
// 在fm-indexv(或者bwt)查找过程中,记录结果
|
|||
|
|
struct bwtintv_t
|
|||
|
|
{
|
|||
|
|
bwtint_t x[3], info; // x[0]表示正链位置,x[1]表示互补链位置,x[2]表示间隔长度,info 表示read的起始结束位置
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 读取二进制数据
|
|||
|
|
bwtint_t fread_fix(FILE *fp, bwtint_t size, void *a);
|
|||
|
|
// 给出问题信息并终止程序
|
|||
|
|
void _err_fatal_simple_core(const char *func, const char *msg);
|
|||
|
|
|
|||
|
|
// base转成2bit值
|
|||
|
|
int bval(char b);
|
|||
|
|
// 互补碱基值
|
|||
|
|
int cbval(char b);
|
|||
|
|
|
|||
|
|
#endif
|