Skip to content

Commit

Permalink
Reset normal tabix class back
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jun 22, 2018
1 parent bc5be1e commit 8cfefce
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/JBrowse/Model/TabixIndex.js
Expand Up @@ -70,26 +70,17 @@ return declare( null, {
var data = new jDataView( bytes, 0, undefined, this._littleEndian );

// check TBI magic numbers
var d = data.getInt32();
if( d == 21578324 /* "TBI\1" */) {
this.tbi = true;
} else if( d == 21582659 /* "CSI\1" */) {
this.csi = true;
} else {
if( data.getInt32() != 21578324 /* "TBI\1" */) {
// try the other endianness if no magic
this._littleEndian = false;
data = new jDataView( bytes, 0, undefined, this._littleEndian );
d = data.getInt32();
if( d != 21578324 /* "TBI\1" */) {
this.tbi = true;
} else if( d == 21582659 /* "CSI\1" */) {
this.csi = true;
} else {
if( data.getInt32() != 21578324 /* "TBI\1" */) {
console.error('Not a TBI file');
deferred.reject('Not a TBI file');
return;
}
}

// number of reference sequences in the index
var refCount = data.getInt32();
this.presetType = data.getInt32();
Expand Down

0 comments on commit 8cfefce

Please sign in to comment.