2 ******************************************************************************
7 *CREATE DATE : 2010-7-29
9 *FUNCTION : a class that can control sam/bam format file. It is convenient to control sam/bam
10 * format file like open, read, write, close and so on.
11 *FILE NAME : SamCtrl.h
12 *UPDATE DATE : 2010-7-30
13 *UPDATE BY : Bill Tang
14 *******************************************************************************
22 #include "sam/faidx.h"
23 #include "sam/knetfile.h"
25 #include "sam/sam_view.h"
26 #include "sam/xcurses.h"
30 #include "sam/kstring.h"
32 #include "sam/sam_header.h"
33 #include "sam/zconf.h"
38 std::string m_in_path
; // the sam/bam in file's path.
39 std::string m_out_path
; // the sam/bam out file's path.
40 samfile_t
*m_in
; // sam/bam file handler, use as reading.
41 samfile_t
*m_out
; // sam/bam file handler, use as writing.
42 std::string m_in_mode
; // reading mode
43 std::string m_out_mode
; // wrinting mode
44 char *m_fn_list
; // sam/bam file list.
45 char *m_s
; // an tmp varible
46 bam1_t
*m_b
; // a bam constructor.
51 bool open(const char *path
, const char *mode
);
53 int readline(std::string
&line
);