Skip to content
Snippets Groups Projects
Commit c3989a1a authored by Aaron's avatar Aaron
Browse files

Fixed bug with parsing name field in bedFile.cpp

parent 64df6024
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -211,7 +211,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -211,7 +211,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = ""; bed.name = "";
bed.score = ""; bed.score = "";
bed.strand = "+"; bed.strand = "";
return true; return true;
} }
else if (this->bedType == 4) { else if (this->bedType == 4) {
...@@ -220,7 +220,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -220,7 +220,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = lineVector[3]; bed.name = lineVector[3];
bed.score = ""; bed.score = "";
bed.strand = "+"; bed.strand = "";
return true; return true;
} }
else if (this->bedType ==5) { else if (this->bedType ==5) {
...@@ -229,7 +229,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -229,7 +229,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = lineVector[3]; bed.name = lineVector[3];
bed.score = lineVector[4]; bed.score = lineVector[4];
bed.strand = "+"; bed.strand = "";
return true; return true;
} }
else if (this->bedType == 6) { else if (this->bedType == 6) {
...@@ -262,6 +262,9 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -262,6 +262,9 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.chrom = lineVector[0]; bed.chrom = lineVector[0];
bed.start = atoi(lineVector[1].c_str()); bed.start = atoi(lineVector[1].c_str());
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = "";
bed.score = "";
bed.strand = "";
return true; return true;
} }
else if (this->bedType == 4) { else if (this->bedType == 4) {
...@@ -269,6 +272,8 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -269,6 +272,8 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.start = atoi(lineVector[1].c_str()); bed.start = atoi(lineVector[1].c_str());
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = lineVector[3]; bed.name = lineVector[3];
bed.score = "";
bed.strand = "+";
return true; return true;
} }
else if (this->bedType ==5) { else if (this->bedType ==5) {
...@@ -276,7 +281,8 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -276,7 +281,8 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.start = atoi(lineVector[1].c_str()); bed.start = atoi(lineVector[1].c_str());
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = lineVector[3]; bed.name = lineVector[3];
bed.score = atoi(lineVector[4].c_str()); bed.score = lineVector[4];
bed.strand = "";
return true; return true;
} }
else if (this->bedType == 6) { else if (this->bedType == 6) {
...@@ -284,7 +290,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in ...@@ -284,7 +290,7 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
bed.start = atoi(lineVector[1].c_str()); bed.start = atoi(lineVector[1].c_str());
bed.end = atoi(lineVector[2].c_str()); bed.end = atoi(lineVector[2].c_str());
bed.name = lineVector[3]; bed.name = lineVector[3];
bed.score = atoi(lineVector[4].c_str()); bed.score = lineVector[4];
bed.strand = lineVector[5]; bed.strand = lineVector[5];
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment