Commit e1613513 authored by sallet's avatar sallet
Browse files

add a case where input reference gff3 file does not finish by #

parent abc9012e
......@@ -1579,6 +1579,12 @@ Prediction::Prediction(char name[FILENAME_MAX+1], DNASeq* seq)
}
}
fclose ( fp );
if (vGeneFeatures.size() > 0)
{
this->LoadGene(vGeneFeatures, vPos, vState, seq);
vGeneFeatures.clear();
}
}
this->Init(0, seq->SeqLen, vPos, vState);
......@@ -1586,8 +1592,6 @@ Prediction::Prediction(char name[FILENAME_MAX+1], DNASeq* seq)
vPos.clear();
vState.clear();
//this->Print();
}
// ------------------------
......@@ -3247,6 +3251,18 @@ bool Gene :: Overlap ( const Gene& g )
return ( ( this->cdsStart <= g.cdsEnd ) && ( this->cdsEnd >= g.cdsStart ) );
}
// ------------------------
// Return the percentage of the gene which overlaps g
// ------------------------
float Gene :: GetOverlapWith ( const Gene& g)
{
int overlapLength = Min(g.trEnd, this->trEnd) - Max(g.trStart, this->trStart);
float length = this->trEnd - this->trStart + 1;
float overlapPercentage = overlapLength/length*100;
return overlapPercentage;
}
// ------------------------
// Eval the predicted genes in comparaison with the reference genes
// If onlycodingGene is true, ignore ncrna prediction in the comparison
......
Supports Markdown
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