Commit 172e680c authored by Carsten Kemena's avatar Carsten Kemena

[bugfix] - corrected 1 shift in xdom format reading

parent 4b338279
......@@ -638,7 +638,7 @@ DomainArrangementSet<DomainType>::_writeXDomFormat(std::ofstream &outFile, const
outFile << ">" << pair.first << " " << seqSet[pair.first].length() << "\n";
for (auto &dom : pair.second)
{
outFile << dom.start() << " " << dom.end() << " " << dom.accession() << " " << dom.evalue() << "\n";
outFile << dom.start()+1 << " " << dom.end()+1 << " " << dom.accession() << " " << dom.evalue() << "\n";
}
}
}
......@@ -653,7 +653,7 @@ DomainArrangementSet<DomainType>::_writeXDomFormat(std::ofstream &outFile) const
outFile << ">" << pair.first << "\n";
for (auto &dom : pair.second)
{
outFile << dom.start() << " " << dom.end() << " " << dom.accession() << " " << dom.evalue() << "\n";
outFile << dom.start()+1 << " " << dom.end()+1 << " " << dom.accession() << " " << dom.evalue() << "\n";
}
}
}
......@@ -946,7 +946,7 @@ DomainArrangementSet<DomainType>::_readXDOMFormat(AP::Input &inFile)
else
{
auto tokens = split(line, " ");
it->second.emplace_back(tokens[2], stoul(tokens[0]), stoul(tokens[1]), stod(tokens[3]));
it->second.emplace_back(tokens[2], stoul(tokens[0])-1, stoul(tokens[1])-1, stod(tokens[3]));
}
}
}
......
......@@ -159,8 +159,8 @@ BOOST_AUTO_TEST_CASE( DomainArrangement_readXDOM_Test )
const BioSeqDataLib::DomainExt &dom = da[1];
BOOST_CHECK_EQUAL(dom.accession(), "PF00002");
BOOST_CHECK_EQUAL(dom.start(), 20);
BOOST_CHECK_EQUAL(dom.end(), 40);
BOOST_CHECK_EQUAL(dom.start(), 19);
BOOST_CHECK_EQUAL(dom.end(), 39);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment