Commit beb58e6e authored by Mikaël Salson's avatar Mikaël Salson
Browse files

segmenter.js: V-REGION identity % takes indels into accounts

However the value may not be defined (when there are no indels),
in which case it is empty. In such a case we fallback to the
identity % without indels.
parent 8c98aa3d
......@@ -569,14 +569,16 @@ Segment.prototype = {
var info = '' ;
if (clone.seg.imgt!=null){
identity = clone.seg.imgt["V-REGION identity %"]
identity = clone.seg.imgt["V-REGION identity % (with ins/del events)"]
if (identity.length == 0)
identity = clone.seg.imgt["V-REGION identity %"]
if (identity != NaN) {
var identityRate = parseFloat(identity)
info = document.createElement('span');
if (V_IDENTITY_THRESHOLD)
info.className += identityRate < V_IDENTITY_THRESHOLD ? ' identityGood' : ' identityBad'
info.appendChild(document.createTextNode(identityRate.toFixed(2) + "%"))
info.setAttribute('title', 'V-REGION identity %, as computed by IMGT/V-QUEST')
info.setAttribute('title', 'V-REGION identity % (with indel), as computed by IMGT/V-QUEST')
}
}
......
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