11
11
12
12
namespace fs = std::filesystem;
13
13
14
- bool condition_header (std::ifstream &fasta, std:: string &line) {
14
+ bool condition_header (std::string &line) {
15
15
if (line[0 ] == ' >' ) {
16
16
return true ;
17
17
}
@@ -32,7 +32,7 @@ bool line_check(std::ifstream &fasta, std::string &line) {
32
32
33
33
void get_complete_sequence (std::ifstream &fasta, std::string &line, std::string &sequence) {
34
34
fasta >> line;
35
- while (!condition_header (fasta, line) && !fasta.eof ()) {
35
+ while (!condition_header (line) && !fasta.eof ()) {
36
36
if (line_check (fasta, line)) {
37
37
sequence.append (line);
38
38
fasta >> line;
@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
86
86
std::string outdir = argv[5 ];
87
87
88
88
std::fstream binassignment;
89
- binassignment.open (tmp_dir + bin_ids);
89
+ binassignment.open (tmp_dir + ' / ' + bin_ids);
90
90
91
91
if (!binassignment.is_open ()) {
92
92
std::cerr << " Error: Unable to open bin assignment file!" << " \n " ;
@@ -114,7 +114,7 @@ int main(int argc, char *argv[]) {
114
114
}
115
115
116
116
fastaFile >> line;
117
- while (condition_header (fastaFile, line)) {
117
+ while (condition_header (line)) {
118
118
sequence = " " ;
119
119
auto range = bins_ids.equal_range (line.substr (1 ,-1 ));
120
120
if (range.first != range.second ) {
@@ -137,7 +137,7 @@ int main(int argc, char *argv[]) {
137
137
}
138
138
else {
139
139
fastaFile >> line;
140
- while (!condition_header (fastaFile, line) && !fastaFile.eof ()) {
140
+ while (!condition_header (line) && !fastaFile.eof ()) {
141
141
fastaFile >> line;
142
142
}
143
143
}
0 commit comments