Skip to content

Commit 1d87958

Browse files
committed
minor change
1 parent 3d1b126 commit 1d87958

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

util/get_sequence_bybin.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace fs = std::filesystem;
1313

14-
bool condition_header(std::ifstream &fasta, std::string &line) {
14+
bool condition_header(std::string &line) {
1515
if (line[0] == '>') {
1616
return true;
1717
}
@@ -32,7 +32,7 @@ bool line_check(std::ifstream &fasta, std::string &line) {
3232

3333
void get_complete_sequence(std::ifstream &fasta, std::string &line, std::string &sequence) {
3434
fasta >> line;
35-
while (!condition_header(fasta, line) && !fasta.eof()) {
35+
while (!condition_header(line) && !fasta.eof()) {
3636
if (line_check(fasta, line)) {
3737
sequence.append(line);
3838
fasta >> line;
@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
8686
std::string outdir = argv[5];
8787

8888
std::fstream binassignment;
89-
binassignment.open(tmp_dir + bin_ids);
89+
binassignment.open(tmp_dir + '/' + bin_ids);
9090

9191
if (!binassignment.is_open()) {
9292
std::cerr << "Error: Unable to open bin assignment file!" << "\n";
@@ -114,7 +114,7 @@ int main(int argc, char *argv[]) {
114114
}
115115

116116
fastaFile >> line;
117-
while (condition_header(fastaFile, line)) {
117+
while (condition_header(line)) {
118118
sequence = "";
119119
auto range = bins_ids.equal_range(line.substr(1,-1));
120120
if (range.first != range.second) {
@@ -137,7 +137,7 @@ int main(int argc, char *argv[]) {
137137
}
138138
else {
139139
fastaFile >> line;
140-
while (!condition_header(fastaFile, line) && !fastaFile.eof()) {
140+
while (!condition_header(line) && !fastaFile.eof()) {
141141
fastaFile >> line;
142142
}
143143
}

0 commit comments

Comments
 (0)