2 ******************************************************************************
7 *CREATE DATE : 2010-8-9
8 *CLASS NAME: FileListManager
9 *FUNCTION : a class that can control Prob_matrix vector. support add, change, get
10 * Matrix ect functions.
11 *FILE NAME : MatrixManager.h
12 *UPDATE DATE : 2010-8-25
13 *UPDATE BY : Bill Tang
14 *UPDATE: 2010-11-2 change the interface which is related to soap file.
16 *******************************************************************************
24 #define INDEX_OVER_FLOW NULL
25 #define CREATE_MAT_FAILED -1
32 virtual ~MatrixManager(void);
34 // a Prob_matrix vectior point
35 vector
<Prob_matrix
*> m_mat_vec
;
37 // add Matrix to the vector
38 virtual int addMatrix(SamCtrl
&alignment
, Parameter
* para
, Genome
* genome
, fstream
*outFile
, int index
);
39 // add a matrix from the prior matrixfile.
40 virtual int addMatrix(igzstream
&alignment
, Parameter
* para
, Genome
* genome
, fstream
*outFile
, int index
);
41 // change the Prob_matrix with new soap_vec
42 virtual int changeMatrix(vector
<Soap_format
>& soap_vec
, Parameter
* para
, Genome
* genome
, int index
);
43 // get a Prob_matrix point that point to the m_mat_vec[index]
44 virtual Prob_matrix
* getMatrix(int index
);
45 // add a matrix from the prior matrixfile.
46 virtual int addMatrix(std::fstream
& matrix_file
, Parameter
*para
);
47 // set the m_mat_vec's size
48 virtual void setMatrixNum(const int number
);
52 void *_matrixManager_addMatrix(void * __args
);
56 * FUNCTION: a parameter structure that about matrix.
60 typedef struct _matrix_args
62 MatrixManager
* matrixManager
;
63 //FileListManager * fileListManager;
66 igzstream
*soap_alignment
;
67 std::fstream
*outFile
;
68 SamCtrl
*sam_alignment
;
73 * FUNCTION: initialize the struct.
77 inline _matrix_args(MatrixManager
* a
, Parameter
* b
, Genome
* c
,
78 igzstream
* d
, std::fstream
* e
, SamCtrl
* f
, int g
)
91 * FUNCTION: initialize the struct.