Commit ff16a09f authored by Mikaël Salson's avatar Mikaël Salson

format-analysis: positions start at 1 in seg

There were some discrepancies that made the situation ambiguous.
Now we clearly state that positions must start at 1.

The code is updated accordingly.
parent 5ce3b613
......@@ -145,7 +145,7 @@ Clone.prototype = {
getSegNtSequence: function(field_name) {
positions = this.getSegStartStop(field_name)
if (positions != null) {
return this.sequence.substr(positions['start'], positions['stop'] - positions['start']+1)
return this.sequence.substr(positions['start']-1, positions['stop'] - positions['start']+1)
}
return '';
},
......
......@@ -189,7 +189,7 @@ test('clone: get info from seg', function() {
equal(pos_junction['start'], 9, "start junction of c1")
equal(pos_junction['stop'], 11, "stop junction of c1")
equal(c1.getSegNtSequence('junction'), 'att', 'junction c1')
equal(c1.getSegNtSequence('junction'), 'aat', 'junction c1')
equal(c1.getSegAASequence('junction'), '', 'no AA junction for c1')
equal(c1.getSegAASequence('cdr3'), 'ABCDE', 'AA CDR3 for c1')
});
......
......@@ -279,6 +279,7 @@ In the .analysis file, this section is intended to describe some specific clones
// in the browser clones, that are not segmented will be shown on the grid with '?/?'
// positions are related to the 'sequence'
// names of V/D/J genes should match the ones in files referenced in germline/germline.data
// Positions must start at 1.
{
"5": "IGHV5*01",
"5start": 0,
......@@ -297,8 +298,9 @@ In the .analysis file, this section is intended to describe some specific clones
// CDR3 should be stored that way (in a field called "cdr3"), this is similar
// for the other region of interest.
// The junction is also stored in that way (in a "junction" field),
// its productivity must be stored in a boolean field called "productive"
"somefeature": { "start": 0, "stop": 0, "seq": "" }
// its productivity must be stored in a boolean field called "productive".
// Positions must also start at 1.
"somefeature": { "start": 1, "stop": 100, "seq": "" }
}
......
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