diff --git a/src/definitions.h b/src/definitions.h index 416a20b..2705d2d 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -81,7 +81,7 @@ typedef std::vector> NodeColourVector; //a pair of start and end coordinates for an ORF across a node typedef std::pair indexPair; // pair that describes the contig locations of an ORF, 1-indexed for contig id (first) and locations within contig (second) -typedef std::pair> ContigLoc; +typedef std::pair> ContigLoc; // tuple holding ORF path ID, nodes traversed, node coordinates, coordinates in path, 5p and 3p coordinates typedef std::pair, std::vector> ORFCoords; // tuple containing a vector of nodeIDs, a vector of start,stop and length coordinates, length of an ORF, relative strand and score and strings for protein/DNA diff --git a/src/match_string.cpp b/src/match_string.cpp index 3d130f3..5a830a1 100644 --- a/src/match_string.cpp +++ b/src/match_string.cpp @@ -120,7 +120,7 @@ std::pair get_ORF_coords(const std::string& query, if (query_loc >= 0) { // go through contig_locs to determine in which contig sequence sits - for (int i = 0; i < contig_locs.size(); i++) + for (size_t i = 0; i < contig_locs.size(); i++) { if (query_loc < contig_locs.at(i)) { @@ -131,7 +131,7 @@ std::pair get_ORF_coords(const std::string& query, } else { // account for 1-indexing - size_t relative_loc = ((query_loc - 1) - contig_locs.at(i - 1)); + int relative_loc = ((query_loc - 1) - contig_locs.at(i - 1)); contig_loc = {i + 1, {(relative_loc - 1), relative_loc + query.size()}}; } break;