Commit bff9b2f6 authored by Dr. Carsten Kemena's avatar Dr. Carsten Kemena
Browse files

fixed cleaning

parent 7897c277
Pipeline #43896 passed with stage
in 1 minute and 14 seconds
......@@ -83,7 +83,7 @@ cleanSuffixe(D &db)
// removing suffix that is has the same ID as the two surrounding ones
// removing the middle suffix if all three IDs are different
// remove the letter of two suffixe if both haf ID=0
// remove one of two suffixe if both have ID=0
if (db.size() > 2)
{
auto prevIt = db.begin();
......@@ -91,10 +91,8 @@ cleanSuffixe(D &db)
auto currIt = nextIt++;
while (nextIt != endIt)
{
if (((currIt->second==0) && (prevIt->second==0)) || ((currIt->second == prevIt->second) && (currIt->second == nextIt->second)) || ((currIt->second != prevIt->second) && (currIt->second != nextIt->second) && (prevIt->second != nextIt->second)))
{
if (((currIt->second==0) && (prevIt->second==0)) || ((currIt->second == prevIt->second) && (currIt->second == nextIt->second)) || ((currIt->second != prevIt->second) && (currIt->second != nextIt->second) && (prevIt->second != nextIt->second)))
currIt = db.erase(currIt);
}
else
{
++currIt;
......@@ -110,14 +108,14 @@ cleanSuffixe(D &db)
{
auto secondLastIt = --db.end();
auto lastIt = secondLastIt--;
if (secondLastIt->second != lastIt->second)
if ((secondLastIt->second != lastIt->second) || (lastIt->second == 0))
db.erase(lastIt);
}
if (db.size() > 1)
{
auto prevIt = db.begin();
auto nextIt = ++db.begin();
if (prevIt->second != nextIt->second)
if ((prevIt->second != nextIt->second) || (prevIt->second == 0))
db.erase(prevIt);
}
......
......@@ -290,7 +290,7 @@ main(int argc, char const *argv[])
BSDL::SequenceSet<BSDL::Sequence<> > newSeqSet;
for (auto &seq : seqSet)
{
auto pair = BSDL::longestOrf(seq, {"ATG"}, {"TAA", "TAG", "TGA"}, 1);
auto pair = BSDL::longestOrf(seq, {"ATG"}, {"TAA", "TAG", "TGA"}, 0);
if (pair.first != pair.second)
{
if (pair.second < 0)
......@@ -350,7 +350,7 @@ main(int argc, char const *argv[])
auto domInfo = infoSet.find(domain.accession());
out << std::left << setw(nameLength) << seqSet[i].name() << " " << std::right << setw(6) << domain.start() << " " << setw(6) << domain.end() \
<< " " << std::right << setw(6) << domain.start() << " " << setw(6) << domain.end() << " " \
<< domain.accession() << std::left << " " << setw(15) << domInfo->second.name << " " << setw(11) << domInfo->second.type << " 0 0 0 0 0 0 " << domInfo->second.clan << "\n";
<< domain.accession() << std::left << " " << setw(15) << domInfo->second.name << " " << setw(11) << domInfo->second.type << " 0 0 0 0 0 0 " << domInfo->second.clan << "\n";
}
}
else
......
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