annotate SMART/Java/Python/Cpp/ncListCreator.hpp @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
1 #ifndef NC_LIST_CREATOR_HPP
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
2 #define NC_LIST_CREATOR_HPP
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4 #include "ncList.hpp"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5 #include "table.hpp"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6 #include "genomicInterval.hpp"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7 #include <set>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8 #include <map>
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10 typedef set<string> Chromosomes;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11 typedef map<string, NCList *> NCLists;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13 static const unsigned int H_CELL_SIZE = 2;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14 static const unsigned int L_CELL_SIZE = 4;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 static const unsigned int T_CELL_SIZE = 5;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17 static const unsigned int START = 0;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18 static const unsigned int END = 1;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 static const unsigned int LIST = 2;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
20 static const unsigned int PARENT = 3;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
21 static const unsigned int NEW = 4;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
22 static const unsigned int LENGTH = 1;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
23
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
24
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
25 class NCListCreator {
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
26
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
27 private:
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
28 string inputFileName;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
29 Table *h, *l, *t;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
30
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
31 string getFileName(string chromosome);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
32 void buildLists(string chromosome);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
33 void createTables(string chromosome);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
34 void initLists(string chromosome);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
35 void fillTables(string chromosome);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
36 void labelLists();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
37 void computeSubStart();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
38 void computeAbsPosition();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
39 void cleanFiles();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
40 void transfer(string chromosome);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
41 unsigned int nbLists, nbLines;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
42
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
43
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
44 public:
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
45 Chromosomes chromosomes;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
46 NCLists ncLists;
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
47
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
48 NCListCreator (string inputFileName);
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
49
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
50 void splitFile ();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
51 void run ();
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
52
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
53 };
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
54
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
55 #endif
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
56
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
57