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

Up-/Downstream Sequence Display #586

Closed Rhinogradentia closed 8 years ago

Rhinogradentia commented 9 years ago

bildschirmfoto vom 2015-05-06 11 17 39

The display of a user chosen number of bases up- or downstream of the current feature would be great.

For example - I want to see the sequence 200 bases before or after my coding sequence or gene etc. As well copy and paste of this sequences should be possible.

The example above is from abrowse - which isn't working stable for me

nauer commented 9 years ago

Yip, this would be a nice feature. Especially, my team mates from the lab have forced me to look for such a feature.

inherlo commented 9 years ago

For us it would be really useful. Specially for comparison of NGS data, we would use it in a regular base.

maciej-kandula commented 9 years ago

Same here. My group would really appreciate this feature.

vivekkrish commented 9 years ago

My colleague @msarmien has developed a plugin called SeqLighter for our JBrowse running at the Arabidopsis Information Portal, https://apps.araport.org/jbrowse/?data=arabidopsis (Please right click any feature in the "Protein Coding Gene Models", the menu should have an option called "View Sequence").

This plugin, which provides some of the features you are interested in, can be hooked up to any track serving gene structures (it has to be configured to use the HTMLFeatures track type).

The plugin code is available here: SeqLighter

Include the plugin in the trackList.json and then enable it for a particular track.

Please refer to our User Guide for more information on plugin features: https://www.araport.org/jbrowse/user-guide

Rhinogradentia commented 9 years ago

Wow - this looks very promising and helpful. Thank you very much @vivekkrish I will try it out.

Rhinogradentia commented 9 years ago

Hi @vivekkrish,

I have a little problem getting the plugin working correctly - would you mind to help me with this a little bit?

I am stuck with the display of the wanted information. Below you can see what the plugin shows me: bildschirmfoto vom 2015-05-11 12 34 28

How can I make the plugin showing me the rest of the stuff I need. Do I miss certain information in the data that the plugin needs?

Your help woudl be really appreciated...

UPDATE: Maybe this is helpful - this error messages are displayed in my java console: GET http://localhost/jbrowse/pichia/plugins/SeqLighter/jslib/biojs/src/main/javascript/Biojs.js (anonymous function) GET http://localhost/jbrowse/pichia/plugins/SeqLighter/jslib/biojs/src/main/resources/dependencies/jquery/jquery-1.4.2.min.js (anonymous function) GET http://localhost/jbrowse/pichia/plugins/SeqLighter/jslib/biojs/src/main/javascript/Biojs.Tooltip.js (anonymous function) GET http://localhost/jbrowse/pichia/plugins/SeqLighter/jslib/biojs/src/main/resources/dependencies/jquery/jquery-ui-1.8.2.custom.min.js (anonymous function) GET http://localhost/jbrowse/pichia/plugins/SeqLighter/jslib/biojs/src/main/javascript/Biojs.Sequence.js

msarmien commented 9 years ago

Dear Nadine,

We would certainly be glad to help. A few things…

The plugin is currently only compatible with HTMLFeatures. So if your gene track is using CanvasFeatures, it will need to be rebuilt with HTMLFeatures. The plugin also expects the subfeatures to be labeled as:

exon CDS five_prime_UTR three_prime_UTR*

*Not required.

Example features in a GFF: example_gff

-Maria

Rhinogradentia commented 9 years ago

Hi Maria,

mh - I didn't load the tracks as CanvasFeatures. To be sure I redid it explicitly as HTMLFeatures like this:

sudo bin/flatfile-to-json.pl --gff data/gs115.gff3 --out data/gs115 --trackLabel gs115_completeReplicon --key 'GS115 Complete Replicon' --nameAttributes "name,alias,id" --trackType HTMLFeatures

As far as I can see it the subfeatures are labled correctly in my data - I have exon, CDS, gene and mRNA in it:

bildschirmfoto vom 2015-05-12 10 53 18

Could there be anything else I am missing? Maybe the error/warning messages from the java console in my former posting are helpful?

Best Regards

Nadine

vivekkrish commented 9 years ago

Hi @GilEstel (Nadine), we're sorry you are still experiencing issues with the plugin.

By default, the flatfile-to-json.pl script loads features from the GFF starting all the way from the top-level gene feature and traverses downwards in the hierarchy.

Might I suggest the following change to the loading command?

sudo bin/flatfile-to-json.pl --gff data/gs115.gff3 --out data/gs115 \
    --trackLabel gs115_completeReplicon --key 'GS115 Complete Replicon' \
    --nameAttributes "name,alias,id" --trackType HTMLFeatures \
    --type "mRNA"

This ensures that the loader will start from the mRNA level instead, which is the expected top level feature in our current plugin implementation.

Please try this out and let us know if you still encounter issues. Thank you!

Rhinogradentia commented 9 years ago

Hi @vivekkrish ,

Thank you for your fast response.

Unfortunately this didn't work out as well.

You can have a look at the following link to check:

http://pichiagenome.boku.ac.at/jbrowse/pichia//?loc=gs115_chr1%3A1340921..1364580&tracks=DNA%2Cgs115_mRNA&highlight= - check the mRNA track. This is the according part from trackList.json: ``` { "category" : "RNAs", "label" : "gs115_mRNA", "key" : "GS115 mRNA", "storeClass" : "JBrowse/Store/SeqFeature/NCList", "trackType" : null, "type" : "FeatureTrack", "urlTemplate" : "tracks/gs115_mRNA/{refseq}/trackData.json", "style" : { "className" : "feature" }, "menuTemplate" : [ { "content" : "function(track,feature,div ){ return SequenceViewer(track,feature,div)}", "iconClass" : "dijitIconDatabase", "action" : "contentDialog", "label" : "View Sequence" } ], "compress" : 0 }, ``` Maybe it is important that I only copied the plugin from your github site and not the full jbrowse branch? Thank you
msarmien commented 9 years ago

Hi Nadine,

Sorry to have overlooked this earlier. The plugin also expects the subfeatures to be defined. You can rerun the script to include subfeatureClasses:

sudo bin/flatfile-to-json.pl --gff data/gs115.gff3 --out data/gs115 \ --trackLabel gs115_completeReplicon --key 'GS115 Complete Replicon' \ --nameAttributes "name,alias,id" --trackType HTMLFeatures \ --type "mRNA" —subfeatureClasses {"exon": "transcript-exon", "CDS": "transcript-CDS"}

Alternatively, you should be able to just include the subfeatureClasses definition in your trackList configuration within the style section like this:

     "style" : {
       "className" : "feature",
       "subfeatureClasses": {
         "exon": "transcript-exon",
         "CDS": "transcript-CDS"
       },
     },

Please let us know if that works or not.

-Maria

Rhinogradentia commented 9 years ago

It works finally :-)

Thank you for your great help!

Best Regards, Nadine

vivekkrish commented 9 years ago

Hi @GilEstel , Glad you were able to get it to work! Thanks to @msarmien for her input on this case. If you have any further issues, please don't hesitate to contact us directly at araport@jcvi.org.

This GitHub issue has prompted us to ensure that we document our current plugins (their usage) and any future development we do, in a better manner.

Thank you and have a great rest of the week!

Regards, Vivek

awilkey commented 9 years ago

I was asked recently to look into implementing a similar feature recently, and I ended up with this: https://github.com/awilkey/seqdisp-jbrowse

While there isn't a demo available on a public-facing server currently, here is a picture of it at work: seqdisp

selewis commented 9 years ago

Hi,

I thought we already had a sequence display view. At least we do in Apollo. If it's not in JBrowse already it should be pushed into it.

I like the options for upstream/downstream.

The existing sequence display has options for different forms: genomic +/- upstream & downstream of feature, gene extent, individual transcripts, and proteins. Stranded features are automatically reverse complemented. Unstranded features display whatever is from the current plus strand (so the rev-comp option you have is nice). All displays include any genomic alterations (variants) that have been added by the user.

Should bring your features into it.

-S

On Mon, Jun 22, 2015 at 8:56 AM, Andrew Wilkey notifications@github.com wrote:

I was asked recently to look into implementing a similar feature recently, and I ended up with this: https://github.com/awilkey/seqdisp-jbrowse

While there isn't a demo available on a public-facing server currently, here is a picture of it at work: [image: seqdisp] https://cloud.githubusercontent.com/assets/7633989/8285991/94c5c924-18cc-11e5-894f-cd99f4442d71.png

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

In the long history of humankind (& animal-kind too) those who learned to collaborate & improvise most effectively have prevailed - Charles Darwin

billzt commented 8 years ago

@awilkey That's great! Easy to use! Just one typo error...

billzt commented 8 years ago

@vivekkrish Hope SeqLighter to be compatible with CanvasFeatures in future and give a detailed README manual.

vivekkrish commented 8 years ago

Hello @billzt (and others on this GitHub issue), thank you for your interest in SeqLighter.

We have decoupled the plugin code from our jbrowse fork into a standalone repo (https://github.com/Arabidopsis-Information-Portal/SeqLighter). Please take a look at the README.md file for more details on how to configure and set up the plugin in your personal JBrowse instance.

In the near future, we will add compatibility with CanvasFeature track types.

Regards, Vivek @ Araport https://www.araport.org/

Rhinogradentia commented 8 years ago

Thank you all again for your help - I will close this issue now, that there are at least two solutions. Anyhow - maybe this would be something usefull to be integrated into JBrowse in general.

Best Regards Nadine