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

{segmenter,crossDomain}.js: Sequence IDs are now unique

Sequences sent to external website have now an unique identifier.
The clone index is prepended to the getName() (with a # as a separator).

This ensure that no sequence will share a same FASTA header, which could
cause some softwares to complain. Also, when analysing the results, we will
easily know which result belongs to which clone.

The clone index is put at the start rather than the end because
IMGT/V-QUEST cuts the header when it is too long.
parent 56ea425c
......@@ -205,7 +205,8 @@ function imgtPostForSegmenter(data, system, override_imgt_options) {
for (var i = 0; i < imgtArray.length; i++) {
//merge clone from segmenter and imgtinfo
//loop through the model maintained selection list
cloneIdx= m.orderedSelectedClones[i];
seq_id = imgtArray[i]["Sequence ID"]
cloneIdx= seq_id.substr(0,seq_id.indexOf('#'))
logmsg += cloneIdx + ",";
//remove unneeded info coz relative to # of selected items
delete imgtArray[i]["Sequence number"];
......
......@@ -655,9 +655,9 @@ Segment.prototype = {
var c = this.m.clone(list[i])
if (typeof (c.getSequence()) != 0){
request += ">" + c.getName() + "\n" + c.getSequence() + "\n";
request += ">" + c.index + "#" + c.getName() + "\n" + c.getSequence() + "\n";
}else{
request += ">" + c.getName() + "\n" + c.id + "\n";
request += ">" + c.index + "#" + c.getName() + "\n" + c.id + "\n";
}
if (c.getSize()>max){
system=c.get('germline')
......
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