Genoverse is a portable, customizable, back-end independent JavaScript and HTML5 based genome browser which allows the user to explore data in a dynamic and interactive manner.
npm install @genoverse/genoverseInstall from npm
``sh`
yarn add @genoverse/genoverse
js
import Genoverse from '@genoverse/genoverse';
`在官方的genoverse基础上,在请求头上添加token的功能,方便在需要token的接口上使用
`js
tracks: [
[ 'Scaleline', { strand: false }],
'Scalebar',
{
name : 'Regulatory Features',
url : '//rest.ensembl.org/overlap/region/human/__CHR__:__START__-__END__?feature=regulatory;content-type=application/json',
resizable : 'auto',
beforeSend :(xhr)=>{
const data = token.refresh();
// 在这里设置token
xhr.setRequestHeader('Authorization', data);
},
urlParams : "",
model : { dataRequestLimit : 5000000 },
setFeatureColor : function (f) { f.color = '#AAA'; }
},
]``