Louis BECQUEY

Standalone script biorseo.py

This diff is collapsed. Click to expand it.
...@@ -22,7 +22,8 @@ typedef unsigned int uint; ...@@ -22,7 +22,8 @@ typedef unsigned int uint;
22 unsigned int Fasta::load(std::list<Fasta>& data, const char* file){ 22 unsigned int Fasta::load(std::list<Fasta>& data, const char* file){
23 23
24 std::string line, name, seq, str; 24 std::string line, name, seq, str;
25 - std::ifstream ifs(file); 25 + std::ifstream ifs;
26 + ifs.open(file, std::ios::in);
26 while (std::getline(ifs, line)) { 27 while (std::getline(ifs, line)) {
27 if (line[0]=='>') { // header 28 if (line[0]=='>') { // header
28 if (!name.empty()) { 29 if (!name.empty()) {
......
...@@ -69,6 +69,7 @@ class NoDaemonProcess(multiprocessing.Process): ...@@ -69,6 +69,7 @@ class NoDaemonProcess(multiprocessing.Process):
69 class NoDaemonContext(type(multiprocessing.get_context())): 69 class NoDaemonContext(type(multiprocessing.get_context())):
70 Process = NoDaemonProcess 70 Process = NoDaemonProcess
71 71
72 +print(multiprocessing)
72 # We sub-class multiprocessing.pool.Pool instead of multiprocessing.Pool 73 # We sub-class multiprocessing.pool.Pool instead of multiprocessing.Pool
73 # because the latter is only a wrapper function, not a proper class. 74 # because the latter is only a wrapper function, not a proper class.
74 class MyPool(multiprocessing.pool.Pool): 75 class MyPool(multiprocessing.pool.Pool):
...@@ -76,7 +77,7 @@ class MyPool(multiprocessing.pool.Pool): ...@@ -76,7 +77,7 @@ class MyPool(multiprocessing.pool.Pool):
76 kwargs['context'] = NoDaemonContext() 77 kwargs['context'] = NoDaemonContext()
77 super(MyPool, self).__init__(*args, **kwargs) 78 super(MyPool, self).__init__(*args, **kwargs)
78 79
79 - 80 +exit()
80 def execute_job(j): 81 def execute_job(j):
81 82
82 if j.checkFunc_ is not None: 83 if j.checkFunc_ is not None:
......