Skip to content

Commit

Permalink
use crc32 of VCF line for feature's unique id
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Oct 25, 2018
1 parent 486a393 commit dea6930
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/JBrowse/Store/SeqFeature/VCFTabix.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ define([
'JBrowse/Model/XHRBlob',
'JBrowse/Model/BlobFilehandleWrapper',
'JBrowse/Model/SimpleFeature',
'JBrowse/Store/SeqFeature/VCF/FeatureMaker'
'JBrowse/Store/SeqFeature/VCF/FeatureMaker',
'JBrowse/Digest/Crc32',
],
function(
declare,
Expand All @@ -25,7 +26,8 @@ define([
XHRBlob,
BlobFilehandleWrapper,
SimpleFeature,
FeatureMaker
FeatureMaker,
Crc32,
) {

return declare( [ SeqFeatureStore, DeferredStatsMixin, DeferredFeaturesMixin, IndexedStatsEstimationMixin, FeatureMaker],
Expand Down Expand Up @@ -117,7 +119,7 @@ return declare( [ SeqFeatureStore, DeferredStatsMixin, DeferredFeaturesMixin, In
const featureData = this.variantToFeature(parser, variant)
const f = new SimpleFeature({
data: featureData,
id: String(fileOffset)
id: Crc32.crc32(line)
});
f.parser = parser;
// override SimpleFeature's get()
Expand Down

0 comments on commit dea6930

Please sign in to comment.