Comments (4)
I can see you've supplied data
as a string, but it's documented to expect an array of objects.
If you want to load it from a separate file you'll need to either create a web server to serve that file in response to the query structure and follow the documentation to specify the URL structure, or write the loader yourself, and inject the result into the Genoverse call.
from genoverse.
I can see you've supplied
data
as a string, but it's documented to expect an array of objects.If you want to load it from a separate file you'll need to either create a web server to serve that file in response to the query structure and follow the documentation to specify the URL structure, or write the loader yourself, and inject the result into the Genoverse call.
Thanks!
The documentation says belows:
actually, it works. The param tracks
is alright.
I just don't konw how to the configure the param genome
, cause I can't load a local genome feature file.
it really scratch my head
maybe I should try your suggestion!
thanks anyway!
from genoverse.
Can we change the loadGenome method to load the genome from the web instead of from the file system. My main issue is that I have this bundled with webpack and to add genomes I would have to rebuild the project. Or hack the runtime to get external files.
I have several approaches, 1) fetch can allow both file system and GET/POST.
or simply get everything over get/post:
loadGenome: function () {
if (typeof this.genome === 'string') {
const genomeName = this.genome.toLowerCase();
//return import(`./genomes/${genomeName}`).then((imported) => {
return jQuery.get(`/javascripts/genomes/${genomeName}`).then((imported)=>
this.genomeName = this.genome.replace(/\..*$/,"")); //added the replace
this.genome = imported;
if (!this.genome) {
this.die(`Unable to load genome ${genomeName}`);
}
});
}
},
The genome.js also becomes a JSON
from genoverse.
to add genomes I would have to rebuild the project
Have you tried loading the genome (e.g. by making an HTTP request to your server's endpoint) prior to instantiating Genoverse, and passing the object in as part of the constructor as documented here?
from genoverse.
Related Issues (20)
- jquery-ui clashes with d3 for mouseup event HOT 3
- Can you make a bundle without jquery and other standard dependencies, available via npm? HOT 6
- How to display highlights? What's the difference between highlights and mouse drag action mode highlights? HOT 2
- In new Genoverse exon-intron structure is not displayed, what's wrong with my parseData? HOT 1
- Convert highlights to histogram HOT 7
- Sequence track dissapears HOT 1
- Track for read coverage 2018
- Track for Coverage 2018 HOT 4
- genoverse leaves some dangling deferreds after browser.destroy() HOT 2
- Is it possible to use pyensembl local database with Genoverse? HOT 1
- How practical HOT 1
- ScatterPlots? HOT 1
- website is broken HOT 1
- How to configure local BED/BAM file as data source? HOT 3
- Does Genoverse browser fit .bb(bigbed) file? HOT 1
- How to load my own genome feature in the Genoverse tracks?
- How to load my own genome feature in the Genoverse tracks?
- When performing a location query, the URL makes two requests.
- Vue2 templates HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genoverse.