Commit 440f1e16 authored by Cyprien Borée's avatar Cyprien Borée

export the N best genes from AlignBox::addToJson

For more informations, see #1409.
parent 6bcafec8
Pipeline #34110 passed with stages
in 50 minutes and 19 seconds
......@@ -89,6 +89,14 @@ void AlignBox::addToJson(json &seg, int alternative_genes) {
}
seg[key] = j ;
/*Export the N best genes if threshold parameter is specified*/
if(rep && !this->score.empty() && rep->size() <= (int)this->score.size() && alternative_genes > 0 && alternative_genes <= (int)this->score.size()){
seg[key + "alt"] = json::array();
for(int i = 0; i < alternative_genes;++i){
int r = this->score[i].second;
seg[key + "alt"].push_back(json::object({{"name",rep->label(r)}}));
}
}
}
......
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