Skip to content

Commit

Permalink
Fix newline bug from windows
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaeltrevizani committed May 9, 2023
1 parent 561f70c commit 04b2c31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tcrmatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ int main(int argc, char *argv[]) {


getline(file1, trust4header); // skips header

if (trust4header.back() == '\n' || trust4header.back() == '\r')
trust4header.erase(trust4header.find_last_of("\r\n"));


std::string valid_header = "#count\tfrequency\tCDR3nt\tCDR3aa\tV\tD\tJ\tC\tcid\tcid_full_length";

// Checking if TRUST4 file is correctly formatted
Expand All @@ -462,7 +467,7 @@ int main(int argc, char *argv[]) {
std::cerr <<"Input file: " + in_file <<std::endl ;
exit(1);
}

while (getline(file1, line)) {
inputlines.push_back( line );

Expand Down

0 comments on commit 04b2c31

Please sign in to comment.