define( ['dojo/_base/declare',
         'JBrowse/Store/SeqFeature'
        ],
        function( declare, SeqFeatureStore ) {

return declare( SeqFeatureStore,
{
    constructor: function( args ) {
        this.features = {};
        this._calculateStats();
    },

    insert: function( feature ) {
        this.features[feature._uniqueID] = feature;
        this._calculateStats();
    },

    delete: function( feature ) {
        delete this.features[ feature._uniqueID ];
        this._calculateStats();
    },

    _calculateStats: function() {
        var minStart = Infinity;
        var maxEnd = -Infinity;
        var featureCount = 0;
        for( var id in this.features ) {
            var f = this.features[id];
            var s = f.get('start');
            var e = f.get('end');
            if( s < minStart )
                minStart = s;

            if( e > maxEnd )
                maxEnd = e;

            featureCount++;
        }

        this.globalStats = {
            featureDensity: featureCount/(maxEnd-minStart+1)
        };
    },

    getFeatures: function( query, featCallback, endCallback, errorCallback ) {
        var start = query.start;
        var end = query.end;
        for( var id in this.features ) {
            var f = this.features[id];
            if(! ( f.get('end') < start  || f.get('start') > end ) ) {
                featCallback( f );
            }
        }
        endCallback();
    }
});
});
@@ -314,24 +314,25 @@
 eatures%5B
+ 
 feature.
 _uniqueI
@@ -323,25 +323,21 @@
 feature.
-_uniqueID
+id() 
 %5D = feat
@@ -457,17 +457,12 @@
 ure.
-_uniqueID
+id()
  %5D;%0A

make the scratchpad store use id() on the features