//>>built
require({cache:{"JBrowse/Store/TabixIndexedFile":function(){define("dojo/_base/declare dojo/_base/array JBrowse/Util JBrowse/Util/TextIterator JBrowse/Store/LRUCache JBrowse/Errors JBrowse/Model/XHRBlob JBrowse/Model/BGZip/BGZBlob JBrowse/Model/TabixIndex".split(" "),function(p,h,m,e,f,n,b,c,a){return p(null,{constructor:function(d){this.browser=d.browser;this.index=new a({blob:new c(d.tbi),browser:d.browser});this.data=new c(d.file);this.indexLoaded=this.index.load();this.chunkSizeLimit=d.chunkSizeLimit||
2E6},getLines:function(d,a,b,c,k,q){var f=this,e=Array.prototype.slice.call(arguments);this.indexLoaded.then(function(){f._fetch.apply(f,e)},q)},_fetch:function(d,a,b,c,k,q){q=q||function(a){console.error(a,a.stack)};var f=this.index.blocksForRange(d,a,b);if(f){f.toString=f.toUniqueString=function(){return this.join(", ")};for(var e=0;e<f.length;e++){var h=f[e].fetchedSize();if(h>this.chunkSizeLimit){q(new n.DataOverflow("Too much data. Chunk size "+m.commifyNumber(h)+" bytes exceeds chunkSizeLimit of "+
m.commifyNumber(this.chunkSizeLimit)+"."));return}}try{this._fetchChunkData(f,d,a,b,c,k,q)}catch(p){q(p)}}else q("Error in index fetch ("+[d,a,b].join()+")")},_fetchChunkData:function(a,b,c,t,k,q,e){if(a.length){var n=0,m=this.chunkCache=this.chunkCache||new f({name:"TabixIndexedFileChunkedCache",fillCallback:dojo.hitch(this,"_readChunkItems"),sizeFunction:function(a){return a.length},maxSize:1E5}),p=this.browser.regularizeReferenceName(b),r;h.forEach(a,function(b){m.get(b,function(b,l){l&&!r&&e(l);
if(!(r=r||l)){for(var f=0;f<b.length;f++){var h=b[f];if(h._regularizedRef==p)if(h.start>t)break;else h.end>=c&&k(h)}++n==a.length&&q()}})})}else q()},_readChunkItems:function(a,b){var c=this,f=[];c.data.read(a.minv.block,a.maxv.block-a.minv.block+1,function(a){a=new Uint8Array(a);a=new e.FromBytes({bytes:a,offset:0});try{c._parseItems(a,function(a){f.push(a)},function(){b(f)})}catch(d){b(null,d)}},function(a){b(null,a)})},_parseItems:function(a,b,c){for(var f=this,k=0;;)if(300>=k){var q=this.parseItem(a);
if(q)b(q),k++;else{c();break}}else{window.setTimeout(function(){f._parseItems(a,b,c)},1);break}},parseItem:function(a){var b=this.index.metaChar,c,f;do c=a.getline();while(c&&(c.charAt(0)==b||"\n"!=c.charAt(c.length-1)||!(f=this.tryParseLine(c))));return c&&f?f:null},tryParseLine:function(a){try{return this.parseLine(a)}catch(b){return null}},parseLine:function(a){a=a.split("\t");a[a.length-1]=a[a.length-1].replace(/\n$/,"");return{ref:a[this.index.columnNumbers.ref-1],_regularizedRef:this.browser.regularizeReferenceName(a[this.index.columnNumbers.ref-
1]),start:parseInt(a[this.index.columnNumbers.start-1]),end:parseInt(a[this.index.columnNumbers.end-1]),fields:a}}})})},"JBrowse/Model/BGZip/BGZBlob":function(){define(["dojo/_base/declare","jszlib/inflate","jszlib/arrayCopy"],function(p,h,m){var e=p(null,{constructor:function(f){this.blob=f},blockSize:65536,slice:function(f,n){return new e(this.blob.slice(f,n))},fetch:function(f,e){this.blob.fetch(this._wrap(f),e)},read:function(f,e,b,c){this.blob.read(f,e+this.blockSize,this._wrap(b,e),c)},_wrap:function(f,
e){var b=this;return function(c){f(b.unbgzf(c,e))}},readInt:function(f,e){return f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]},readShort:function(f,e){return f[e+1]<<8|f[e]},readFloat:function(f,e){for(var b=new Uint8Array(4),c=0;4>c;c++)b[c]=f[e+c];return(new Float32Array(b.buffer))[0]},unbgzf:function(f,e){e=Math.min(e||Infinity,f.byteLength-27);for(var b=[],c=0,a=[0];a[0]<e;a[0]+=8){var d=new Uint8Array(f,a[0],18);if(!(31==d[0]&&139==d[1])){console.error("invalid BGZF block header, skipping",d);break}var d=
this.readShort(d,10),d=a[0]+12+d,l;try{l=h(f,d,f.byteLength-d,a)}catch(g){if(/^Z_BUF_ERROR/.test(g.statusString)&&b.length)break;else throw g;}l.byteLength&&(c+=l.byteLength,b.push(l))}if(1==b.length)return b[0];c=new Uint8Array(c);for(l=a=0;l<b.length;++l)d=new Uint8Array(b[l]),m(d,0,c,a,d.length),a+=d.length;return c.buffer}});return e})},"JBrowse/Model/TabixIndex":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/Deferred JBrowse/has jDataView JBrowse/Util JBrowse/Model/BGZip/VirtualOffset".split(" "),
function(p,h,m,e,f,n,b){var c=n.fastDeclare({constructor:function(a,d,b){this.minv=a;this.maxv=d;this.bin=b},toUniqueString:function(){return this.minv+".."+this.maxv+" (bin "+this.bin+")"},toString:function(){return this.toUniqueString()},compareTo:function(a){return this.minv.compareTo(a.minv)||this.maxv.compareTo(a.maxv)||this.bin-a.bin},compare:function(a){return this.compareTo(a)},fetchedSize:function(){return this.maxv.block+65536-this.minv.block+1}});return p(null,{constructor:function(a){this.browser=
a.browser;this.blob=a.blob;this.load()},load:function(){var a=this;return this._loaded=this._loaded||function(){var d=new m;e("typed-arrays")?this.blob.fetch(function(b){a._parseIndex(b,d)},dojo.hitch(d,"reject")):d.reject("This web browser lacks support for JavaScript typed arrays.");return d}.call(this)},_parseIndex:function(a,d){this._littleEndian=!0;var l=new f(a,0,void 0,this._littleEndian);if(21578324!=l.getInt32()&&(this._littleEndian=!1,l=new f(a,0,void 0,this._littleEndian),21578324!=l.getInt32())){console.error("Not a TBI file");
d.reject("Not a TBI file");return}var g=l.getInt32();this.presetType=l.getInt32();this.columnNumbers={ref:l.getInt32(),start:l.getInt32(),end:l.getInt32()};this.metaChar=(this.metaValue=l.getInt32())?String.fromCharCode(this.metaValue):null;this.skipLines=l.getInt32();this._refIDToName=Array(g);this._refNameToID={};var e=l.getInt32();this._parseNameBytes(l.getBytes(e,void 0,!1));this._indices=Array(g);for(e=0;e<g;++e){for(var k=l.getInt32(),q=this._indices[e]={binIndex:{}},h=0;h<k;++h){for(var m=
l.getInt32(),n=l.getInt32(),p=Array(n),r=0;r<n;++r){var s=new b(l.getBytes(8)),u=new b(l.getBytes(8));this._findFirstData(s);p[r]=new c(s,u,m)}q.binIndex[m]=p}k=l.getInt32();q=q.linearIndex=Array(k);for(r=0;r<k;++r)q[r]=new b(l.getBytes(8)),this._findFirstData(q[r])}d.resolve({success:!0})},_findFirstData:function(a){var d=this.firstDataLine;this.firstDataLine=d?0<d.compareTo(a)?a:d:a},_parseNameBytes:function(a){function d(){var d=a[c++];return d?String.fromCharCode(d):null}function b(){for(var a,
c="";a=d();)c+=a;return c.length?c:null}for(var c=0,e,k=0;e=b();k++)this._refIDToName[k]=e,this._refNameToID[this.browser.regularizeReferenceName(e)]=k},hasRefSeq:function(a,d,b){var c=this;a=c.browser.regularizeReferenceName(a);c.load().then(function(){a in c._refNameToID?d(!0):d(!1)})},getRefId:function(a){a=this.browser.regularizeReferenceName(a);return this._refNameToID[a]},TAD_LIDX_SHIFT:14,blocksForRange:function(a,d,l){0>d&&(d=0);a=this.getRefId(a);a=this._indices[a];if(!a)return[];var g=a.linearIndex;
a=a.binIndex;l=this._reg2bins(d,l);var e=g.length?g[d>>this.TAD_LIDX_SHIFT>=g.length?g.length-1:d>>this.TAD_LIDX_SHIFT]:new b(0,0);for(d=g=0;d<l.length;++d)g+=(a[l[d]]||[]).length;if(0==g)return[];var k=[],f;for(d=g=0;d<l.length;++d)if(f=a[l[d]])for(var h=0;h<f.length;++h)0>e.compareTo(f[h].maxv)&&(k[g++]=new c(f[h].minv,f[h].maxv,f[h].bin));if(!k.length)return[];k=k.sort(function(a,d){return a.compareTo(d)});d=1;for(a=0;d<g;++d)0>k[a].maxv.compareTo(k[d].maxv)&&(++a,k[a].minv=k[d].minv,k[a].maxv=
k[d].maxv);g=a+1;for(d=1;d<g;++d)0<=k[d-1].maxv.compareTo(k[d].minv)&&(k[d-1].maxv=k[d].minv);d=1;for(a=0;d<g;++d)k[a].maxv.block!=k[d].minv.block&&(++a,k[a].minv=k[d].minv),k[a].maxv=k[d].maxv;return k.slice(0,a+1)},_reg2bin:function(a,d){--d;return a>>14==d>>14?4681+(a>>14):a>>17==d>>17?585+(a>>17):a>>20==d>>20?73+(a>>20):a>>23==d>>23?9+(a>>23):a>>26==d>>26?1+(a>>26):0},_reg2bins:function(a,d){var b,c=[];--d;c.push(0);for(b=1+(a>>26);b<=1+(d>>26);++b)c.push(b);for(b=9+(a>>23);b<=9+(d>>23);++b)c.push(b);
for(b=73+(a>>20);b<=73+(d>>20);++b)c.push(b);for(b=585+(a>>17);b<=585+(d>>17);++b)c.push(b);for(b=4681+(a>>14);b<=4681+(d>>14);++b)c.push(b);return c}})})},"jDataView/jdataview":function(){define([],function(){var p={};(function(h){var m={ArrayBuffer:"undefined"!==typeof ArrayBuffer,DataView:"undefined"!==typeof DataView&&("getFloat64"in DataView.prototype||"getFloat64"in new DataView(new ArrayBuffer(1))),NodeBuffer:"undefined"!==typeof Buffer&&"readInt16LE"in Buffer.prototype},e={Int8:1,Int16:2,
Int32:4,Uint8:1,Uint16:2,Uint32:4,Float32:4,Float64:8},f={Int8:"Int8",Int16:"Int16",Int32:"Int32",Uint8:"UInt8",Uint16:"UInt16",Uint32:"UInt32",Float32:"Float",Float64:"Double"},n=function(b,c,a,d){if(!(this instanceof n))throw Error("jDataView constructor may not be called as a function");this.buffer=b;if(!(m.NodeBuffer&&b instanceof Buffer)&&!(m.ArrayBuffer&&b instanceof ArrayBuffer)&&"string"!==typeof b)throw new TypeError("jDataView buffer has an incompatible type");this._isArrayBuffer=m.ArrayBuffer&&
b instanceof ArrayBuffer;this._isDataView=m.DataView&&this._isArrayBuffer;this._isNodeBuffer=m.NodeBuffer&&b instanceof Buffer;this._littleEndian=Boolean(d);var l=this._isArrayBuffer?b.byteLength:b.length;void 0===c&&(c=0);this.byteOffset=c;void 0===a&&(a=l-c);this.byteLength=a;if(!this._isDataView){if("number"!==typeof c)throw new TypeError("jDataView byteOffset is not a number");if("number"!==typeof a)throw new TypeError("jDataView byteLength is not a number");if(0>c)throw Error("jDataView byteOffset is negative");
if(0>a)throw Error("jDataView byteLength is negative");}this._isDataView&&(this._view=new DataView(b,c,a),this._start=0);this._start=c;if(c+a>l)throw Error("jDataView (byteOffset + byteLength) value is out of bounds");this._offset=0;if(this._isDataView)for(var g in e)e.hasOwnProperty(g)&&function(a,b){var d=e[a];b["get"+a]=function(c,g){void 0===g&&(g=b._littleEndian);void 0===c&&(c=b._offset);b._offset=c+d;return b._view["get"+a](c,g)}}(g,this);else if(this._isNodeBuffer&&m.NodeBuffer)for(g in e)e.hasOwnProperty(g)&&
function(a,b,d){var c=e[a];b["get"+a]=function(a,g){void 0===a&&(a=b._offset);b._offset=a+c;return b.buffer[d](b._start+a)}}(g,this,"Int8"===g||"Uint8"===g?"read"+f[g]:d?"read"+f[g]+"LE":"read"+f[g]+"BE");else for(g in e)e.hasOwnProperty(g)&&function(a,b){var d=e[a];b["get"+a]=function(c,g){void 0===g&&(g=b._littleEndian);void 0===c&&(c=b._offset);b._offset=c+d;if(b._isArrayBuffer&&0===(b._start+c)%d&&(1===d||g))return(new h[a+"Array"](b.buffer,b._start+c,1))[0];if("number"!==typeof c)throw new TypeError("jDataView byteOffset is not a number");
if(c+d>b.byteLength)throw Error("jDataView (byteOffset + size) value is out of bounds");return b["_get"+a](b._start+c,g)}}(g,this)};n.createBuffer=m.NodeBuffer?function(){return new Buffer(arguments)}:m.ArrayBuffer?function(){return(new Uint8Array(arguments)).buffer}:function(){return String.fromCharCode.apply(null,arguments)};n.prototype={compatibility:m,_getBytes:function(b,c,a){var d;void 0===a&&(a=this._littleEndian);void 0===c&&(c=this._offset);if("number"!==typeof c)throw new TypeError("jDataView byteOffset is not a number");
if(0>b||c+b>this.byteLength)throw Error("jDataView length or (byteOffset+length) value is out of bounds");c+=this._start;this._isArrayBuffer?d=new Uint8Array(this.buffer,c,b):(d=this.buffer.slice(c,c+b),this._isNodeBuffer||(d=Array.prototype.map.call(d,function(a){return a.charCodeAt(0)&255})));a&&1<b&&(d instanceof Array||(d=Array.prototype.slice.call(d)),d.reverse());this._offset=c-this._start+b;return d},getBytes:function(b,c,a){var d=this._getBytes.apply(this,arguments);d instanceof Array||(d=
Array.prototype.slice.call(d));return d},getString:function(b,c){var a;if(this._isNodeBuffer){void 0===c&&(c=this._offset);if("number"!==typeof c)throw new TypeError("jDataView byteOffset is not a number");if(0>b||c+b>this.byteLength)throw Error("jDataView length or (byteOffset+length) value is out of bounds");a=this.buffer.toString("ascii",this._start+c,this._start+c+b);this._offset=c+b}else a=String.fromCharCode.apply(null,this._getBytes(b,c,!1));return a},getChar:function(b){return this.getString(1,
b)},tell:function(){return this._offset},seek:function(b){if("number"!==typeof b)throw new TypeError("jDataView byteOffset is not a number");if(0>b||b>this.byteLength)throw Error("jDataView byteOffset value is out of bounds");return this._offset=b},_getFloat64:function(b,c){var a=this._getBytes(8,b,c),d=1-2*(a[0]>>7),e=((a[0]<<1&255)<<3|a[1]>>4)-(Math.pow(2,10)-1),a=(a[1]&15)*Math.pow(2,48)+a[2]*Math.pow(2,40)+a[3]*Math.pow(2,32)+a[4]*Math.pow(2,24)+a[5]*Math.pow(2,16)+a[6]*Math.pow(2,8)+a[7];return 1024===
e?0!==a?NaN:Infinity*d:-1023===e?d*a*Math.pow(2,-1074):d*(1+a*Math.pow(2,-52))*Math.pow(2,e)},_getFloat32:function(b,c){var a=this._getBytes(4,b,c),d=1-2*(a[0]>>7),e=(a[0]<<1&255|a[1]>>7)-127,a=(a[1]&127)<<16|a[2]<<8|a[3];return 128===e?0!==a?NaN:Infinity*d:-127===e?d*a*Math.pow(2,-149):d*(1+a*Math.pow(2,-23))*Math.pow(2,e)},_getInt32:function(b,c){var a=this._getUint32(b,c);return a>Math.pow(2,31)-1?a-Math.pow(2,32):a},_getUint32:function(b,c){var a=this._getBytes(4,b,c);return a[0]*Math.pow(2,24)+
(a[1]<<16)+(a[2]<<8)+a[3]},_getInt16:function(b,c){var a=this._getUint16(b,c);return a>Math.pow(2,15)-1?a-Math.pow(2,16):a},_getUint16:function(b,c){var a=this._getBytes(2,b,c);return(a[0]<<8)+a[1]},_getInt8:function(b){b=this._getUint8(b);return b>Math.pow(2,7)-1?b-Math.pow(2,8):b},_getUint8:function(b){return this._getBytes(1,b)[0]}};"undefined"!==typeof jQuery&&"1.6.2"<=jQuery.fn.jquery&&(jQuery.ajaxSetup({converters:{"* dataview":function(b){return new n(b)}},accepts:{dataview:"text/plain; charset\x3dx-user-defined"},
responseHandler:{dataview:function(b,c,a){if("mozResponseArrayBuffer"in a)b.text=a.mozResponseArrayBuffer;else if("responseType"in a&&"arraybuffer"===a.responseType&&a.response)b.text=a.response;else if("responseBody"in a){c=a.responseBody;var d;try{d=IEBinaryToArray_ByteStr(c)}catch(e){window.execScript("Function IEBinaryToArray_ByteStr(Binary)\r\n\tIEBinaryToArray_ByteStr \x3d CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n\tDim lastIndex\r\n\tlastIndex \x3d LenB(Binary)\r\n\tif lastIndex mod 2 Then\r\n\t\tIEBinaryToArray_ByteStr_Last \x3d AscB( MidB( Binary, lastIndex, 1 ) )\r\n\tElse\r\n\t\tIEBinaryToArray_ByteStr_Last \x3d -1\r\n\tEnd If\r\nEnd Function\r\n",
"vbscript"),d=IEBinaryToArray_ByteStr(c)}c=IEBinaryToArray_ByteStr_Last(c);a="";for(var g=0,f=d.length%8,k;g<f;)k=d.charCodeAt(g++),a+=String.fromCharCode(k&255,k>>8);for(f=d.length;g<f;)a+=String.fromCharCode((k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8,(k=d.charCodeAt(g++),k&255),k>>8);-1<c&&(a+=String.fromCharCode(c));
b.text=a}else b.text=a.responseText}}}),jQuery.ajaxPrefilter("dataview",function(b,c,a){jQuery.support.ajaxResponseType&&(b.hasOwnProperty("xhrFields")||(b.xhrFields={}),b.xhrFields.responseType="arraybuffer");b.mimeType="text/plain; charset\x3dx-user-defined"}));h.jDataView=(h.module||{}).exports=n;"undefined"!==typeof module&&(module.exports=n)})(p);return p.jDataView})},"JBrowse/Model/BGZip/VirtualOffset":function(){define(["JBrowse/Util"],function(p){return p.fastDeclare({constructor:function(h,
m){2<=arguments.length?(this.block=h,this.offset=m):this._fromBytes(h)},_fromBytes:function(h,m){m=m||0;var e=1099511627776*h[m]+4294967296*h[m+1]+16777216*h[m+2]+65536*h[m+3]+256*h[m+4]+h[m+5],f=h[m+6]<<8|h[m+7];0==e&&0==f?this.block=this.offset=null:(this.block=e,this.offset=f)},toString:function(){return""+this.block+":"+this.offset},compareTo:function(h){return this.block-h.block||this.offset-h.offset},cmp:function(h){return this.compareTo(h)}})})},"JBrowse/Store/SeqFeature/GlobalStatsEstimationMixin":function(){define(["dojo/_base/declare",
"dojo/_base/array","dojo/Deferred","JBrowse/Errors"],function(p,h,m,e){return p(null,{_estimateGlobalStats:function(f){var n=new m;f=f||this.refSeq;var b=this.storeTimeout||3E3,c=new Date,a=function(a,b){var d=this,c=0.75*f.start+0.25*f.end,e=Math.max(0,Math.round(c-a/2)),m=Math.min(Math.round(c+a/2),f.end),n=[];this._getFeatures({ref:f.name,start:e,end:m},function(a){n.push(a)},function(c){n=h.filter(n,function(a){return a.get("start")>=e&&a.get("end")<=m});b.call(d,a,{featureDensity:n.length/a,
_statsSampleFeatures:n.length,_statsSampleInterval:{ref:f.name,start:e,end:m,length:a}})},function(c){b.call(d,a,null,c)})},d=function(l,g,h){if(h)h.isInstanceOf(e.DataOverflow)?n.resolve({featureDensity:0,error:"global stats estimation found chunkSizeError"}):n.reject(h);else{var k=f.end-f.start;300<=g._statsSampleFeatures||2*l>k||h?n.resolve(g):new Date-c<b?a.call(this,2*l,d):n.resolve({featureDensity:0,error:"global stats estimation timed out"})}};a.call(this,100,d);return n}})})},"JBrowse/Store/SeqFeature/VCFTabix/Parser":function(){define("dojo/_base/declare dojo/_base/array dojo/json JBrowse/Util/TextIterator JBrowse/Digest/Crc32 ./LazyFeature".split(" "),
function(p,h,m,e,f,n){return p(null,{parseHeader:function(b){var c={};b=new e.FromBytes({bytes:b});for(var a;a=b.getline();)if("#"==a[0]){var d=/^##([^\s#=]+)=(.+)/.exec(a);d&&d[1]?(a=d[1].toLowerCase(),d=d[2]||"",d.match(/^<.+>$/)&&(d=this._parseGenericHeaderLine(d)),c[a]||(c[a]=[]),c[a].push(d)):/^#CHROM\t/.test(a)&&(d=a.split("\t"),"FORMAT"==d[8]&&9<d.length&&(c.samples=d.slice(9)))}for(var f in c)dojo.isArray(c[f])&&("object"==typeof c[f][0]&&"id"in c[f][0])&&(c[f]=this._indexUniqObjects(c[f],
"id"));return this.header=c},lineToFeature:function(b){for(var c=b.fields,a=[],d=0;d<c.length;d++)"."==c[d]&&(c[d]=null);var e=c[3],d=c[4],g=this._find_SO_term(e,d);b={start:b.start,end:b.start+e.length,seq_id:b.ref,description:this._makeDescriptionString(g,e,d),type:g,reference_allele:e};null!==c[2]&&(a=(c[2]||"").split(";"),b.name=a[0],1<a.length&&(b.aliases=a.slice(1).join(",")));null!==c[5]&&(b.score=parseFloat(c[5]));null!==c[6]&&(b.filter={meta:{description:"List of filters that this site has not passed, or PASS if it has passed all filters",
filters:this.header.filter},values:c[6].split(";")});d&&"\x3c"!=d[0]&&(b.alternative_alleles={meta:{description:"VCF ALT field, list of alternate non-reference alleles called on at least one of the samples"},values:d});this._parseInfoField(b,c);return new n({id:a[0]||c.slice(0,9).join("/"),data:b,fields:c,parser:this})},_parseGenericHeaderLine:function(b){b=b.replace(/^<|>$/g,"");return this._parseKeyValue(b,",",";","lowercase")},_vcfReservedInfoFields:{AA:{description:"ancestral allele"},AC:{description:"allele count in genotypes, for each ALT allele, in the same order as listed"},
AF:{description:"allele frequency for each ALT allele in the same order as listed: use this when estimated from primary data, not called genotypes"},AN:{description:"total number of alleles in called genotypes"},BQ:{description:"RMS base quality at this position"},CIGAR:{description:"cigar string describing how to align an alternate allele to the reference allele"},DB:{description:"dbSNP membership"},DP:{description:"combined depth across samples, e.g. DP\x3d154"},END:{description:"end position of the variant described in this record (esp. for CNVs)"},
H2:{description:"membership in hapmap2"},MQ:{description:"RMS mapping quality, e.g. MQ\x3d52"},MQ0:{description:"Number of MAPQ \x3d\x3d 0 reads covering this record"},NS:{description:"Number of samples with data"},SB:{description:"strand bias at this position"},SOMATIC:{description:"indicates that the record is a somatic mutation, for cancer genomics"},VALIDATED:{description:"validated by follow-up experiment"},IMPRECISE:{number:0,type:"Flag",description:"Imprecise structural variation"},NOVEL:{number:0,
type:"Flag",description:"Indicates a novel structural variation"},SVTYPE:{number:1,type:"String",description:"Type of structural variant"},SVLEN:{number:".",type:"Integer",description:"Difference in length between REF and ALT alleles"},CIPOS:{number:2,type:"Integer",description:"Confidence interval around POS for imprecise variants"},CIEND:{number:2,type:"Integer",description:"Confidence interval around END for imprecise variants"},HOMLEN:{type:"Integer",description:"Length of base pair identical micro-homology at event breakpoints"},
HOMSEQ:{type:"String",description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{type:"String",description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{number:4,type:"String",description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{number:4,type:"String",description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{number:1,type:"String",description:"ID of this element in Database of Genomic Variation"},
DBVARID:{number:1,type:"String",description:"ID of this element in DBVAR"},DBRIPID:{number:1,type:"String",description:"ID of this element in DBRIP"},MATEID:{type:"String",description:"ID of mate breakends"},PARID:{number:1,type:"String",description:"ID of partner breakend"},EVENT:{number:1,type:"String",description:"ID of event associated to breakend"},CILEN:{number:2,type:"Integer",description:"Confidence interval around the length of the inserted material between breakends"},DPADJ:{type:"Integer",
description:"Read Depth of adjacency"},CN:{number:1,type:"Integer",description:"Copy number of segment containing breakend"},CNADJ:{type:"Integer",description:"Copy number of adjacency"},CICN:{number:2,type:"Integer",description:"Confidence interval around copy number for the segment"},CICNADJ:{type:"Integer",description:"Confidence interval around copy number for the adjacency"}},_vcfStandardGenotypeFields:{GT:{description:"genotype, encoded as allele values separated by either of '/' or '|'. The allele values are 0 for the reference allele (what is in the REF field), 1 for the first allele listed in ALT, 2 for the second allele list in ALT and so on. For diploid calls examples could be 0/1, 1|0, or 1/2, etc. For haploid calls, e.g. on Y, male non-pseudoautosomal X, or mitochondrion, only one allele value should be given; a triploid call might look like 0/0/1. If a call cannot be made for a sample at a given locus, '.' should be specified for each missing allele in the GT field (for example './.' for a diploid genotype and '.' for haploid genotype). The meanings of the separators are as follows (see the PS field below for more details on incorporating phasing information into the genotypes): '/' meaning genotype unphased, '|' meaning genotype phased"},
DP:{description:"read depth at this position for this sample (Integer)"},FT:{description:'sample genotype filter indicating if this genotype was "called" (similar in concept to the FILTER field). Again, use PASS to indicate that all filters have been passed, a semi-colon separated list of codes for filters that fail, or "." to indicate that filters have not been applied. These values should be described in the meta-information in the same way as FILTERs (String, no white-space or semi-colons permitted)'},
GL:{description:"genotype likelihoods comprised of comma separated floating point log10-scaled likelihoods for all possible genotypes given the set of alleles defined in the REF and ALT fields. In presence of the GT field the same ploidy is expected and the canonical order is used; without GT field, diploidy is assumed. If A is the allele in REF and B,C,... are the alleles as ordered in ALT, the ordering of genotypes for the likelihoods is given by: F(j/k) \x3d (k*(k+1)/2)+j.  In other words, for biallelic sites the ordering is: AA,AB,BB; for triallelic sites the ordering is: AA,AB,BB,AC,BC,CC, etc.  For example: GT:GL 0/1:-323.03,-99.29,-802.53 (Floats)"},
GLE:{description:"genotype likelihoods of heterogeneous ploidy, used in presence of uncertain copy number. For example: GLE\x3d0:-75.22,1:-223.42,0/0:-323.03,1/0:-99.29,1/1:-802.53 (String)"},PL:{description:"the phred-scaled genotype likelihoods rounded to the closest integer (and otherwise defined precisely as the GL field) (Integers)"},GP:{description:"the phred-scaled genotype posterior probabilities (and otherwise defined precisely as the GL field); intended to store imputed genotype probabilities (Floats)"},
GQ:{description:"conditional genotype quality, encoded as a phred quality -10log_10p(genotype call is wrong, conditioned on the site's being variant) (Integer)"},HQ:{description:"haplotype qualities, two comma separated phred qualities (Integers)"},PS:{description:"phase set.  A phase set is defined as a set of phased genotypes to which this genotype belongs.  Phased genotypes for an individual that are on the same chromosome and have the same PS value are in the same phased set.  A phase set specifies multi-marker haplotypes for the phased genotypes in the set.  All phased genotypes that do not contain a PS subfield are assumed to belong to the same phased set.  If the genotype in the GT field is unphased, the corresponding PS field is ignored.  The recommended convention is to use the position of the first variant in the set as the PS identifier (although this is not required). (Non-negative 32-bit Integer)"},
PQ:{description:'phasing quality, the phred-scaled probability that alleles are ordered incorrectly in a heterozygote (against all other members in the phase set).  We note that we have not yet included the specific measure for precisely defining "phasing quality"; our intention for now is simply to reserve the PQ tag for future use as a measure of phasing quality. (Integer)'},EC:{description:"comma separated list of expected alternate allele counts for each alternate allele in the same order as listed in the ALT field (typically used in association analyses) (Integers)"},
MQ:{description:"RMS mapping quality, similar to the version in the INFO field. (Integer)"}},_vcfReservedAltTypes:{DEL:{description:"Deletion relative to the reference",so_term:"deletion"},INS:{description:"Insertion of novel sequence relative to the reference",so_term:"insertion"},DUP:{description:"Region of elevated copy number relative to the reference",so_term:"copy_number_gain"},INV:{description:"Inversion of reference sequence",so_term:"inversion"},CNV:{description:"Copy number variable region (may be both deletion and duplication)",
so_term:"copy_number_variation"},"DUP:TANDEM":{description:"Tandem duplication",so_term:"copy_number_gain"},"DEL:ME":{description:"Deletion of mobile element relative to the reference"},"INS:ME":{description:"Insertion of a mobile element relative to the reference"}},_parseInfoField:function(b,c){if(c[7]&&"."!=c[7]){var a=this._parseKeyValue(c[7]),d;for(d in a)if(a.hasOwnProperty(d)){var e=a[d]={values:a[d],toString:function(){return(this.values||[]).join(",")}},g=this.getVCFMetaData("INFO",d);g&&
(e.meta=g)}dojo.mixin(b,a)}},getVCFMetaData:function(b,c){b=b.toLowerCase();var a={alt:this._vcfReservedAltTypes,info:this._vcfReservedInfoFileds,format:this._vcfStandardGenotypeFields}[b]||{};return(this.header[b]||{})[c]||a[c]},_indexUniqObjects:function(b,c,a){var d={};h.forEach(b,function(b){var g=b[c];dojo.isArray(g)&&(g=g[0]);a&&g.toLowerCase();d[b[c]]=b});return d},_parseKeyValue:function(b,c,a,d){c=c||";";a=a||",";for(var e={},g="",f="",k=1,h=0;h<b.length;h++)1==k?"\x3d"==b[h]?(d&&(g=g.toLowerCase()),
e[g]=[],k=2):b[h]==c?(d&&(g=g.toLowerCase()),e[g]=[!0],g="",k=1):g+=b[h]:2==k?b[h]==a?(e[g].push(f),f=""):b[h]==c?(e[g].push(f),g="",k=1,f=""):'"'==b[h]?(k=3,f=""):f+=b[h]:3==k&&('"'!=b[h]?f+=b[h]:k=2);(2==k||3==k)&&e[g].push(f);return e},_find_SO_term:function(b,c){if(!c||"."==c)return"remark";var a=h.filter(h.map(c.split(","),function(a){return this._find_SO_term_from_alt_definitions(a)},this),function(a){return a});return a[0]?a.join(","):this._find_SO_term_by_examination(b,c)},_makeDescriptionString:function(b,
c,a){if(!a)return"no alternative alleles";a=a.replace(/^<|>$/g,"");var d=this.getVCFMetaData("alt",a);return d&&d.description?a+" - "+d.description:b+" "+c+" -\x3e "+a},_find_SO_term_from_alt_definitions:function(b){if("\x3c"!=b[0])return null;b=b.replace(/^<|>$/g,"");var c=(this.header.alt||{})[b]||this._vcfReservedAltTypes[b];if(c&&c.so_term)return c.so_term;b=b.split(":");return 1<b.length?this._find_SO_term_from_alt_definitions("\x3c"+b.slice(0,b.length-1).join(":")+"\x3e"):null},_find_SO_term_by_examination:function(b,
c){c=c.split(",");var a=Infinity,d=-Infinity;h.map(c,function(b){var c=b.length;c<a&&(a=c);c>d&&(d=c);return b.length});return 1==b.length&&1==a&&1==d?"SNV":b.length==a&&b.length==d?1==c.length&&b.split("").reverse().join("")==c[0]?"inversion":"substitution":b.length<=a&&b.length<d?"insertion":b.length>a&&b.length>=d?"deletion":"indel"}})})},"JBrowse/Store/SeqFeature/VCFTabix/LazyFeature":function(){define(["dojo/_base/array","dojo/json","JBrowse/Util"],function(p,h,m){return m.fastDeclare({constructor:function(e){this.parser=
e.parser;this.data=e.data;this._id=e.id;this.fields=e.fields},get:function(e){return this._get(e)||this._get(e.toLowerCase())},_get:function(e){return e in this.data?this.data[e]:this.data[e]=this["_parse_"+e]?this["_parse_"+e]():void 0},parent:function(){return null},children:function(){return null},tags:function(){var e=[],f=this.data,h;for(h in f)f.hasOwnProperty(h)&&e.push(h);f.genotypes||e.push("genotypes");return e},id:function(){return this._id},_parse_genotypes:function(){var e=this.fields,
f=this.parser;delete this.fields;delete this.parser;if(10>e.length)return null;for(var h=[],b=p.map(e[8].split(":"),function(a){return{id:a,meta:f.getVCFMetaData("FORMAT",a)}},this),c=9;c<e.length;++c){for(var a=(e[c]||"").split(":"),d={},l=0;l<b.length;++l){var g=a[l]||"";d[b[l].id]={values:'"'==g.charAt(0)?[g]:g.split(","),meta:b[l].meta}}h.push(d)}e={};for(c=0;c<h.length;c++)(b=(f.header.samples||{})[c])&&(e[b]=h[c]);e.toString=this._stringifySample;return e},_stringifySample:function(){var e=
{},f;for(f in this){var m=e[f]={},b;for(b in this[f])m[b]=this[f][b].values}return(JSON||h).stringify(e)}})})}}});
define("JBrowse/Store/SeqFeature/VCFTabix","dojo/_base/declare dojo/_base/lang dojo/Deferred JBrowse/Store/SeqFeature JBrowse/Store/DeferredStatsMixin JBrowse/Store/DeferredFeaturesMixin JBrowse/Store/TabixIndexedFile JBrowse/Store/SeqFeature/GlobalStatsEstimationMixin JBrowse/Model/XHRBlob ./VCFTabix/Parser".split(" "),function(p,h,m,e,f,n,b,c,a,d){var l=p(b,{parseLine:function(){var a=this.inherited(arguments);a&&(a.start--,a.end=a.start+a.fields[3].length);return a}});return p([e,f,n,c,d],{constructor:function(b){var c=
this,d=b.tbi||new a(this.resolveUrl(this.getConf("tbiUrlTemplate",[])||this.getConf("urlTemplate",[])+".tbi")),e=b.file||new a(this.resolveUrl(this.getConf("urlTemplate",[])));this.indexedData=new l({tbi:d,file:e,browser:this.browser,chunkSizeLimit:b.chunkSizeLimit||1E6});this.getVCFHeader().then(function(a){c._deferred.features.resolve({success:!0});c._estimateGlobalStats().then(function(a){c.globalStats=a;c._deferred.stats.resolve(a)},h.hitch(c,"_failAllDeferred"))},h.hitch(c,"_failAllDeferred"));
this.storeTimeout=b.storeTimeout||3E3},getVCFHeader:function(){var a=this;return this._parsedHeader||(this._parsedHeader=function(){var b=new m,c=h.hitch(b,"reject");a.indexedData.indexLoaded.then(function(){a.indexedData.data.read(0,a.indexedData.index.firstDataLine?a.indexedData.index.firstDataLine.block+a.indexedData.data.blockSize-1:null,function(c){a.parseHeader(new Uint8Array(c));b.resolve(a.header)},c)},c);return b}.call(this))},_getFeatures:function(a,b,c,d){var e=this;e.getVCFHeader().then(function(){e.indexedData.getLines(a.ref||
e.refSeq.name,a.start,a.end,function(a){a=e.lineToFeature(a);b(a)},c,d)},d)},hasRefSeq:function(a,b,c){return this.indexedData.index.hasRefSeq(a,b,c)},saveStore:function(){return{urlTemplate:this.config.file.url,tbiUrlTemplate:this.config.tbi.url}}})});
//# sourceMappingURL=VCFTabix.js.map