GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
460 stars 199 forks source link

plugin dev #609

Closed zhjilin closed 7 years ago

zhjilin commented 9 years ago

Hi,

Is there any detail document about the plugin developing? I have custom data format, and I can't find a way to convert it into the defined the format (please don't ask me why). So, I tried to 'mimic' a simple plugin to visualize it.

I stole part of codes from the current source packages and seems it is working for the defined data format ( GFF, BW). However, I don't quite understand the backend process of data handling ( read feature file, parse into certain data-object, pass this object to the store config, then what? ). Thus, my questions are: How to visualize the data object parsed from the file ?(I guess I need to define a store);

Is it possible to use SVG plot as a feature rather than the canavas? (I know nothing about canvas, just want to have a tiny svg plot, which can be rendered instantly).

It's appreciated If somebody can generally help me sort it out. Also, it would be super nice if you can give advices on the tools that I can use to debug the dojo code efficiently.

Thanks in advance!

Best, Jilin

cmdcolin commented 9 years ago

Hi @zhjilin . Have you had any progress on this? I think you definitely have the right idea (taking some other existing data stores and track types as an example) and I don't think you would have any trouble with SVG. There is also some work on some more API documentation with @enuggetry that will perhaps help!

As far as using and debugging jbrowse, it is fairly straightforward if you have the right packages. Just make sure you use the JBrowse-1.11.6-dev.zip package instead of the JBrowse-1.11.6.zip package, as this will have the full unminified source code, or alternatively, you can easily run jbrowse from a github clone too (there aren't any complicated setup steps, just see README.md for instructions on setting up the github clone with --recursive).

enuggetry commented 9 years ago

Thanks, Colin. I'm working on a more detailed architectural document which should helpful to developers. I should have a draft completed by next week.

On Wed, Jul 8, 2015 at 2:31 PM, Colin Diesh notifications@github.com wrote:

Hi @zhjilin https://github.com/zhjilin . Have you had any progress on this? I think you definitely have the right idea (taking some other existing data stores and track types as an example) and I don't think you would have any trouble with SVG. There is also some work on some more API documentation with @enuggetry https://github.com/enuggetry that will perhaps help!

As far as using and debugging jbrowse, it is fairly straightforward if you have the right packages. Just make sure you use the JBrowse-1.11.6-dev.zip package instead of the JBrowse-1.11.6.zip package, as this will have the full unminified source code, or alternatively, you can easily run jbrowse from a github clone too (there aren't any complicated setup steps, just see README.md for instructions on setting up the github clone with --recursive).

— Reply to this email directly or view it on GitHub https://github.com/GMOD/jbrowse/issues/609#issuecomment-119736183.

zhjilin commented 9 years ago

Thanks for the reply, Colin! I read through the all the core code for GFF3 file. I think I figured out the data structure. I completed parser,driver and main function to partially visualize my file as simplefeature and it worked (without the SVG part i need) . Next step, I will try to define a custom store to render SVG, as long as I find out how to fit SVG code neatly.  I will check documents from @enuggetry to see if I can get something.

Best, Jilin

_____________________________

From: Colin Diesh notifications@github.com Sent: 星期四, 七月 9, 2015 12:31 上午 Subject: Re: [jbrowse] plugin dev (#609) To: GMOD/jbrowse jbrowse@noreply.github.com Cc: zhjilin zhjilin@gmail.com

Hi @zhjilin . Have you had any progress on this? I think you definitely have the right idea (taking some other existing data stores and track types as an example) and I don't think you would have any trouble with SVG. There is also some work on some more API documentation with @enuggetry that will perhaps help!

As far as using and debugging jbrowse, it is fairly straightforward if you have the right packages. Just make sure you use the JBrowse-1.11.6-dev.zip package instead of the JBrowse-1.11.6.zip package, as this will have the full unminified source code, or alternatively, you can easily run jbrowse from a github clone too (there aren't any complicated setup steps, just see README.md for instructions on setting up the github clone with --recursive).

— Reply to this email directly or view it on GitHub.

ktamilvanan commented 9 years ago

Is there an update on the document. I am trying to create a custom store inside my plugin. I have followed the GFF3 parsing structure, but storeClassname is not able to find my file if i provide a relative path to the current folder. Not sure how to add the Store folder inside the plugin structure.

enuggetry commented 9 years ago

Hi ktamilvanan,

To reference a store class in your plugin, I think this is one way you can handle it.

if your store class is in plugins/MyPlugin/store/MyStoreClass.js,

In your config file specify the additional 'location' in the plugins section:

"plugins" : [{ "location" : "./plugins/MyPlugin", "name" : "MyPlugin" }],

Then in the track definition you can include:

storeClass: "MyPlugin/store/MyStoreClass",

I'm going to verify this soon because I need to do something similar.

Eric

On Mon, Sep 7, 2015 at 7:07 PM, ktamilvanan notifications@github.com wrote:

Is there an update on the document. I am trying to create a custom store inside my plugin. I have followed the GFF3 parsing structure, but storeClassname is not able to find my file if i provide a relative path to the current folder. Not sure how to add the Store folder inside the plugin structure.

— Reply to this email directly or view it on GitHub https://github.com/GMOD/jbrowse/issues/609#issuecomment-138409427.

cmdcolin commented 7 years ago

Good info, I think we can incorporate as much as possible into documentation. Otherwise maybe close for now