You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(21) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(15) |
Feb
(34) |
Mar
(20) |
Apr
(19) |
May
(15) |
Jun
(15) |
Jul
(10) |
Aug
(6) |
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(3) |
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
(3) |
Feb
|
Mar
(27) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(16) |
Aug
(19) |
Sep
(55) |
Oct
(51) |
Nov
(15) |
Dec
(10) |
2010 |
Jan
(11) |
Feb
(3) |
Mar
(22) |
Apr
(13) |
May
(9) |
Jun
(23) |
Jul
(59) |
Aug
(63) |
Sep
(24) |
Oct
(46) |
Nov
(20) |
Dec
(14) |
2011 |
Jan
(16) |
Feb
(16) |
Mar
(4) |
Apr
(9) |
May
(3) |
Jun
(5) |
Jul
(1) |
Aug
(3) |
Sep
(6) |
Oct
(7) |
Nov
|
Dec
(5) |
2012 |
Jan
(6) |
Feb
(37) |
Mar
(24) |
Apr
(24) |
May
(19) |
Jun
(26) |
Jul
(14) |
Aug
(21) |
Sep
(27) |
Oct
(16) |
Nov
(43) |
Dec
(42) |
2013 |
Jan
(24) |
Feb
(26) |
Mar
(31) |
Apr
(56) |
May
(82) |
Jun
(79) |
Jul
(30) |
Aug
(76) |
Sep
(40) |
Oct
(85) |
Nov
(105) |
Dec
(136) |
2014 |
Jan
(92) |
Feb
(84) |
Mar
(48) |
Apr
(84) |
May
(80) |
Jun
(46) |
Jul
(104) |
Aug
(70) |
Sep
(74) |
Oct
(53) |
Nov
(36) |
Dec
(3) |
2015 |
Jan
(10) |
Feb
(37) |
Mar
(52) |
Apr
(30) |
May
(101) |
Jun
(42) |
Jul
(32) |
Aug
(25) |
Sep
(50) |
Oct
(60) |
Nov
(74) |
Dec
(41) |
2016 |
Jan
(26) |
Feb
(42) |
Mar
(89) |
Apr
(26) |
May
(50) |
Jun
(66) |
Jul
(54) |
Aug
(65) |
Sep
(57) |
Oct
(9) |
Nov
(42) |
Dec
(7) |
2017 |
Jan
(37) |
Feb
(24) |
Mar
(22) |
Apr
(22) |
May
(39) |
Jun
(57) |
Jul
(10) |
Aug
(39) |
Sep
(17) |
Oct
(43) |
Nov
(18) |
Dec
(32) |
2018 |
Jan
(31) |
Feb
(29) |
Mar
(23) |
Apr
(31) |
May
(13) |
Jun
(21) |
Jul
(32) |
Aug
(42) |
Sep
(25) |
Oct
(36) |
Nov
(16) |
Dec
(5) |
2019 |
Jan
(35) |
Feb
(25) |
Mar
(13) |
Apr
(3) |
May
(9) |
Jun
(9) |
Jul
(22) |
Aug
(19) |
Sep
(4) |
Oct
(5) |
Nov
(3) |
Dec
(1) |
2020 |
Jan
(9) |
Feb
(22) |
Mar
(13) |
Apr
(7) |
May
(4) |
Jun
(8) |
Jul
(9) |
Aug
(13) |
Sep
(24) |
Oct
(8) |
Nov
(21) |
Dec
(10) |
2021 |
Jan
(9) |
Feb
(4) |
Mar
(33) |
Apr
(9) |
May
(7) |
Jun
(1) |
Jul
(8) |
Aug
(14) |
Sep
(15) |
Oct
(10) |
Nov
(10) |
Dec
(2) |
2022 |
Jan
(8) |
Feb
(14) |
Mar
(17) |
Apr
(6) |
May
(37) |
Jun
(20) |
Jul
(7) |
Aug
(17) |
Sep
(2) |
Oct
(8) |
Nov
(11) |
Dec
|
2023 |
Jan
(6) |
Feb
|
Mar
(3) |
Apr
(6) |
May
(10) |
Jun
(16) |
Jul
(2) |
Aug
(3) |
Sep
(18) |
Oct
(9) |
Nov
(8) |
Dec
(14) |
2024 |
Jan
(5) |
Feb
(2) |
Mar
(11) |
Apr
(10) |
May
(4) |
Jun
(2) |
Jul
(4) |
Aug
|
Sep
|
Oct
(5) |
Nov
(8) |
Dec
|
2025 |
Jan
(3) |
Feb
|
Mar
(3) |
Apr
(7) |
May
(5) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael T. <m....@qf...> - 2023-10-13 03:53:13
|
Hi Colin, Thank you for speedy reply and clarification ! I can relate the REST API (aka mygene.info) to a project I am working on and using this Django framework to embed jbrowse into it (machado <https://machado.readthedocs.io/en/latest/jbrowse.html>). I am keen to use Jbrowse2 but the main issue is how to translate the trackList.json to config.json for my project. As you mentioned above, most of the Jbrowse1 options are dropped for Jbrowse2. I guess I need to investigate a bit more to see how much work I need to use Jbrowse2 for my project. The good news is the Machado Framework does come with API <https://www.machado.cnptia.embrapa.br/demo_machado/api/> setup and I am trying to understand how to combine the API and the Jbrowse2 in the config.json (Jbrowse2) based on the trackList.json <https://github.com/lmb-embrapa/machado/blob/master/extras/trackList.json.sample> (Jbrowse1) format. I think this is the config.json <https://github.com/cmdcolin/jbrowse-plugin-biothings-api/blob/master/config.json> you use to retrieve reference genome and tracks using API call. For me, it is a bit difficult to understand the options you use in the config.json. I believe there must be a documentation somewhere . can you please point me to the documentation if available? To date, I managed to setup the Jbrowse2 running on my apache server without any problems. What I want to explore next is to work on the REST API call to query and show the tracks/assemblies of interest on an embedded Jbrowse2. However, I am kind of stuck at the moment. Best On Friday, October 13, 2023 at 11:16:28 AM UTC+10 Colin wrote: > Hi Michael, > > Many of the JBrowse 1 options do not automatically apply to JBrowse 2 > because the config.json format is quite a bit different from trackList.json. > > > I also see that your trackList.json refers to a "REST" data adapter from > JBrowse 1 (JBrowse/Store/SeqFeature/REST) but this data adapter type was > not added to JBrowse 2. We did not add this to JBrowse 2 because it is hard > or awkward to design a "blessed" or "recommended" REST API format that we > want users to implement. If you do want to make an adapter for your REST > API, you can write a custom plugin to do so. I may be biased because I > wrote a lot of data adapters for various REST APIs on the web as plugins ( > mygene.info adapter, UCSC rest api adapter, etc) but my feeling is that > it is relatively little code (100-200 lines for example) and it can > actually be useful, as a developer, to be in control of the client code > that is accessing your particular REST API. > > If your main concerns are getting a JBrowse 1 REST API working with > JBrowse 2 I can elaborate, or I can help with any of the other JBrowse 2 > upgrade steps too :) > > > -Colin > > On Thu, Oct 12, 2023 at 11:42 AM Nathan Dunn <ndu...@gmail.com> wrote: > >> >> >> On Oct 11, 2023, at 11:40 PM, Michael Thang <m.t...@qfab.org> wrote: >> >> Hi Apollo Team, >> I would like to find out how to translate this Jbrowse1 trackList.json >> <https://github.com/hexylena/JBrowse-REST-API-Example/blob/master/data/trackList.json> >> to Jbrowse2. I just borrowed the trackList.json online, but I am running >> into the same situation where I have my Jbrowse1 configured to run API. I >> am exploring the posssiblity to use the same trackList.json format for >> Jbrowse2. However, the Jbrowse2 is using config.json instead and the json >> looks different. Therefore, I dont know if all these options >> <https://jbrowse.org/docs/global_options.html> are still applicable for >> Jbrowse2. >> >> >> >> -- >> To unsubscribe from this group and stop receiving emails from it, send an >> email to apollo+un...@lbl.gov. >> >> >> |
From: Colin <col...@gm...> - 2023-10-13 01:16:36
|
Hi Michael, Many of the JBrowse 1 options do not automatically apply to JBrowse 2 because the config.json format is quite a bit different from trackList.json. I also see that your trackList.json refers to a "REST" data adapter from JBrowse 1 (JBrowse/Store/SeqFeature/REST) but this data adapter type was not added to JBrowse 2. We did not add this to JBrowse 2 because it is hard or awkward to design a "blessed" or "recommended" REST API format that we want users to implement. If you do want to make an adapter for your REST API, you can write a custom plugin to do so. I may be biased because I wrote a lot of data adapters for various REST APIs on the web as plugins ( mygene.info adapter, UCSC rest api adapter, etc) but my feeling is that it is relatively little code (100-200 lines for example) and it can actually be useful, as a developer, to be in control of the client code that is accessing your particular REST API. If your main concerns are getting a JBrowse 1 REST API working with JBrowse 2 I can elaborate, or I can help with any of the other JBrowse 2 upgrade steps too :) -Colin On Thu, Oct 12, 2023 at 11:42 AM Nathan Dunn <nd...@gm...> wrote: > > > On Oct 11, 2023, at 11:40 PM, Michael Thang <m....@qf...> wrote: > > Hi Apollo Team, > I would like to find out how to translate this Jbrowse1 trackList.json > <https://github.com/hexylena/JBrowse-REST-API-Example/blob/master/data/trackList.json> > to Jbrowse2. I just borrowed the trackList.json online, but I am running > into the same situation where I have my Jbrowse1 configured to run API. I > am exploring the posssiblity to use the same trackList.json format for > Jbrowse2. However, the Jbrowse2 is using config.json instead and the json > looks different. Therefore, I dont know if all these options > <https://jbrowse.org/docs/global_options.html> are still applicable for > Jbrowse2. > > > > -- > To unsubscribe from this group and stop receiving emails from it, send an > email to apo...@lb.... > > > |
From: Nathan D. <nd...@gm...> - 2023-10-12 15:42:29
|
> On Oct 11, 2023, at 11:40 PM, Michael Thang <m....@qf...> wrote: > > Hi Apollo Team, > I would like to find out how to translate this Jbrowse1 trackList.json <https://github.com/hexylena/JBrowse-REST-API-Example/blob/master/data/trackList.json> to Jbrowse2. I just borrowed the trackList.json online, but I am running into the same situation where I have my Jbrowse1 configured to run API. I am exploring the posssiblity to use the same trackList.json format for Jbrowse2. However, the Jbrowse2 is using config.json instead and the json looks different. Therefore, I dont know if all these options <https://jbrowse.org/docs/global_options.html> are still applicable for Jbrowse2. > > > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to apo...@lb... <mailto:apo...@lb...>. |
From: Scott C. <sc...@sc...> - 2023-09-28 20:57:25
|
Huh, it should work. Are you using the same data you pointed out to me ( sp5_0_transcript-tagged.gff3 <https://bigfrog.xenbase.org/pub/xenbase/genomics/share/sp5_0_transcript-tagged.gff3>)? Also, how did you load the track? My ff2json command looked like this: bin/flatfile-to-json.pl --gff sp5_0_transcript-tagged.gff3 --trackLabel Genes --trackType CanvasFeatures which is pretty bare-bones. the full track config looks like this: { "compress" : 0, "key" : "Genes", "label" : "Genes", "storeClass" : "JBrowse/Store/SeqFeature/NCList", "noncodingType" : ["transcript","lnc_RNA","miRNA","pseudogene","rRNA","snRNA","snoRNA","tRNA"], "style" : { "className" : "feature", "unprocessedTranscriptColor" : "function(feature) {var tag = feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if (tag == 'non-coding' ) {return 'red'}; return 'blue';}", "color" : "function(feature) {console.log(feature); var tag = feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if (tag == 'non-coding' ) {return 'red'}; return 'goldenrod';}" }, "trackType" : "CanvasFeatures", "type" : "CanvasFeatures", "urlTemplate" : "tracks/Genes/{refseq}/trackData.json" }, On Wed, Sep 27, 2023 at 10:04 AM Vaneet Lotay <van...@uc...> wrote: > Hey Scott, > > > > I tried it and unfortunately the same results. The non-coding genes are > colored red but I believe that’s due to the default behaviour of JBrowse > trying to color non-coding sequences red. I’ve tried with green which was > my original choice and they still stay red, that’s why I’m sure there’s > some sort of JBrowse code perhaps overriding these callback functions in > some cases. I only left with red for non-coding since JBrowse is already > trying to color them red anyways, but green was the desired choice. > > > > For pseudoduplicates, it doesn’t show magenta like in the code, but seems > to color the UTRs in red since ‘clip_marker_color’ is set to red in config > when I look. Not sure what’s going on there. > > > > I’m a little confused about the ‘noncodingType’ variable you added in the > config there. It wasn’t used in the if block, so is this just a variable I > may make use of if I need to, in terms of checking if the feature type is > in this array? Or is this part of a global JBrowse variable that we’re > replacing with new contents? > > > > Thanks, > > > > vaneet > > > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 26, 2023 3:08 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hi Vaneet, > > > > I think I've at least gotten close. There are a few tricks: you can > specify a list of transcript types that are noncoding, and you can specify > what the noncoding transcripts are colored with a callback, so I have this > snippet of a config: > > > > "noncodingType" : > ["transcript","lnc_RNA","miRNA","pseudogene","rRNA","snRNA","snoRNA","tRNA"], > "style" : { > "className" : "feature", > "unprocessedTranscriptColor" : "function(feature) {var tag = > feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if > (tag == 'non-coding' ) {return 'red'}; return 'blue';}", > "color" : "function(feature) {console.log(feature); var tag = > feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if > (tag == 'non-coding' ) {return 'red'}; return 'goldenrod';}" > }, > > > > I'm not positive you wanted the 'transcript' transcripts to be coding or > not, so I included them in noncoding. Also, I noticed that sometimes mRNAs > have tag attributes too, so I wrote the callback for both color and > unprocessedTranscriptColor. > > > > Anyway, this should get you close to what you're looking for. > > > > Scott > > > > > > > > > > On Mon, Sep 25, 2023 at 11:31 AM Vaneet Lotay <van...@uc...> > wrote: > > Hey Scott, > > > > You can access my GFF3 files here: > > > > https://bigfrog.xenbase.org/pub/xenbase/genomics/share/ > > > > So the ‘transcript-tagged’ GFF3 is where I added a ‘tag’ attribute to the 9 > th column at the transcript level as you were saying these callback > functions usually access features at the transcript level. > > > > When that wasn’t working I changed the values in the source column (2nd > column) to hold my tags which is what the ‘source-tagged’ GFF3 has. This > is for the echinoderm S. purpuratus v5.0 genome. Do you need the genome > sequence file as well? > > > > Thanks for looking into this, appreciate it! > > > > Vaneet > > > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 21, 2023 2:03 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hi Vaneet, > > > > Sorry this is being such a pain. Can you send me a url to your GFF? I'll > try setting up a test instance to see if I can sort it out. > > > > Scott > > > > > > On Thu, Sep 21, 2023 at 10:27 AM Vaneet Lotay <van...@uc...> > wrote: > > I still can’t get it to work properly. Since you had mentioned that > JBrowse extracts the feature at the transcript level I tagged these genes > at the transcript as well as the parent gene level in the GFF3. Also I > decided to add the tag in the ‘source’ column in the GFF3 as that had > worked for me in the past and perhaps easier to extract: > > > > customColor = function(feature) { > > var src = feature.get('source'); > > if (src == 'PS-DUP') { > > return 'magenta'; > > } else if (src == 'Non-coding'){ > > return 'red'; > > } > > return 'goldenrod'; > > } > > > > However this still doesn’t work. I tried printing to the console the > value of the ‘src’ variable to see if it’s picking up something and it does > at least for one of the two conditions I have (PS-DUP), so not perfect I > suppose. Maybe I’m missing some conditional code somewhere in the JBrowse > source code that keep overwriting something as it seems to add red either > to the main color or the ‘clip colour’ to the gene models. That’s why I > simply picked red as one of my colors to give in to this phenomenon since > it seems like it’s targeting non-coding transcripts anyways. Is this > functionality any easier in JBrowse2? I’m beginning to setup a version of > JBrowse2 slowly, which is why I ask. > > > > Coloring gene model tracks has always been a tricky thing for me, any help > anyone can provide would be great. > > > > Thanks, > > > Vaneet > > > > > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 5:19 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > I am reasonably sure that syntax is right; it turns out that function is > no longer used in our site, but I found a current track that has this > callback: > > > > "color" : "function(f) {var type = f._parent.get('predictiontype'); if > (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return > 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == > 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return > 'lightsalmon';} return 'purple'; }" > > > > BUT!!!! This applies to features that only have a parent and a child; > coloring genes is even more tricky. I forgot that I'd run into some > difficulties with how JBrowse was representing genes (at least 6 or 7 years > ago), so I ended up writing my own Gene glyph that handles coloring among > other things: > > > > > https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs > > > > I don't think you'll need to do this though, but I can't remember how to > deal with it. > > > > Colin, help :-) > > > > Scott > > > > > > > > On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...> > wrote: > > I suppose I can just tag everything to the transcript as that seems to > work. How do you override that default behavior of JBrowse trying to > estimate that a transcript is non-coding and colors it red? Even when I > can successfully change the color using my callback function, that red > color remains for some transcripts where JBrowse is controlling it. Even > when I try to manually change it via 'Edit config' in a temporary session > it doesn't change the red. > > > > Thanks, > > > > Vaneet > ------------------------------ > > *From:* Vaneet Lotay <van...@uc...> > *Sent:* September 13, 2023 3:36 PM > *To:* Scott Cain <sc...@sc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: [Gmod-ajax] JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hey Scott, > > > > Is that the right syntax for calling the parent gene feature: > > > > > > > > > > > > > > *parentRainbowHeatMap = function(feature) { var score = > feature._parent.get('score'); var max = 0.01; var min = 2.50; > if(score<max) {score = max;} if (score >min) {score = min;} var > blueness = 190*((score-min)/(max-min)); var hex = > Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + > hex; } var color = '#' + hex + hex + 'DD'; return color; }* > > > > I'm asking because it results in this error from my browser console: > > > > *Uncaught TypeError: feature._parent is undefined* > > > > I tried without the period or without the underscore, still finds it > undefined. > > > > Thanks, > > > Vaneet > ------------------------------ > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 12:02 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hi Vaneet, > > > > Coloring things in gene tracks can be tricky; the feature that is being > considered when the color is applied is (I think) the transcript-level > feature, not the parent gene. So if you've attached an attribute to the > parent gene that you want to use, you actually have to get the parent > feature first. As an example, I have this function: > > > > parentRainbowHeatMap = function(feature) { > var score = feature._parent.get('score'); > var max = 0.01; > var min = 2.50; > if(score<max) {score = max;} > if (score >min) {score = min;} > var blueness = 190*((score-min)/(max-min)); > var hex = Math.round(blueness).toString(16); > if (hex.length < 2) { hex = '0' + hex; } > var color = '#' + hex + hex + 'DD'; > return color; } > > > > that gets the parent feature's score in order to determine the color of > the transcript. > > > > For the red transcripts--I think the gene glyph is trying to determine if > a transcript is noncoding and if it thinks it is, it colors it red. I'm not > positive about that though--I pretty much never use the default color in > gene tracks :-) > > > > Scott > > > > > > On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...> > wrote: > > Hi Scott, > > > > If you or anyone in the JBrowse community can help me with this, I’d > appreciate it. I’ve used callback functions before successfully to add > links within the ‘View details’ box for various attributes. Now what I > would like to do is color specific genes in my GFF3 a certain color > depending on a certain attribute. What I’ve done is added a ‘tag’ > attribute that would indicate whether the gene is a non-coding gene or not > as well as other types, like so at the end of the 9th column of the GFF3: > > > > > ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding > > > > Then I defined a callback function which would extract this attribute and > pick the color based on the value, while keeping what I believe is the > default JBrowse track color as the backup option (goldenrod): > > > > customColor = function(feature) { > > gtag = feature.get('tag'); > > if (gtag == 'pseudoduplicate') { > > return 'magenta'; > > } else if (gtag == 'non-coding'){ > > return 'green'; > > } else{ > > return 'goldenrod'; > > } > > return 'goldenrod'; > > } > > > > Then under the style stanza of the track I added the call to the function: > > > > "style" : { > > "className" : "feature", > > “color” : “{customColor}” > > }, > > > > I’ve done this for other callback functions successfully, but perhaps > coloring the track behaves differently. I might also be not extracting the > attribute properly from the GFF or my code has errors, please let me know > if this is the case. I have been able to extract other attributes from the > 9th column of GFF3 before so I know it’s possible, but just not working > as expected here. Also it seems some of my gene models already seem to be > colored red for some reason without this callback function even being used > as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, > can you explain why that happens? > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager ( https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-27 17:04:38
|
Hey Scott, I tried it and unfortunately the same results. The non-coding genes are colored red but I believe that’s due to the default behaviour of JBrowse trying to color non-coding sequences red. I’ve tried with green which was my original choice and they still stay red, that’s why I’m sure there’s some sort of JBrowse code perhaps overriding these callback functions in some cases. I only left with red for non-coding since JBrowse is already trying to color them red anyways, but green was the desired choice. For pseudoduplicates, it doesn’t show magenta like in the code, but seems to color the UTRs in red since ‘clip_marker_color’ is set to red in config when I look. Not sure what’s going on there. I’m a little confused about the ‘noncodingType’ variable you added in the config there. It wasn’t used in the if block, so is this just a variable I may make use of if I need to, in terms of checking if the feature type is in this array? Or is this part of a global JBrowse variable that we’re replacing with new contents? Thanks, vaneet From: Scott Cain <sc...@sc...> Sent: September 26, 2023 3:08 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, I think I've at least gotten close. There are a few tricks: you can specify a list of transcript types that are noncoding, and you can specify what the noncoding transcripts are colored with a callback, so I have this snippet of a config: "noncodingType" : ["transcript","lnc_RNA","miRNA","pseudogene","rRNA","snRNA","snoRNA","tRNA"], "style" : { "className" : "feature", "unprocessedTranscriptColor" : "function(feature) {var tag = feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if (tag == 'non-coding' ) {return 'red'}; return 'blue';}", "color" : "function(feature) {console.log(feature); var tag = feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if (tag == 'non-coding' ) {return 'red'}; return 'goldenrod';}" }, I'm not positive you wanted the 'transcript' transcripts to be coding or not, so I included them in noncoding. Also, I noticed that sometimes mRNAs have tag attributes too, so I wrote the callback for both color and unprocessedTranscriptColor. Anyway, this should get you close to what you're looking for. Scott On Mon, Sep 25, 2023 at 11:31 AM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hey Scott, You can access my GFF3 files here: https://bigfrog.xenbase.org/pub/xenbase/genomics/share/ So the ‘transcript-tagged’ GFF3 is where I added a ‘tag’ attribute to the 9th column at the transcript level as you were saying these callback functions usually access features at the transcript level. When that wasn’t working I changed the values in the source column (2nd column) to hold my tags which is what the ‘source-tagged’ GFF3 has. This is for the echinoderm S. purpuratus v5.0 genome. Do you need the genome sequence file as well? Thanks for looking into this, appreciate it! Vaneet From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 21, 2023 2:03 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Sorry this is being such a pain. Can you send me a url to your GFF? I'll try setting up a test instance to see if I can sort it out. Scott On Thu, Sep 21, 2023 at 10:27 AM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: I still can’t get it to work properly. Since you had mentioned that JBrowse extracts the feature at the transcript level I tagged these genes at the transcript as well as the parent gene level in the GFF3. Also I decided to add the tag in the ‘source’ column in the GFF3 as that had worked for me in the past and perhaps easier to extract: customColor = function(feature) { var src = feature.get('source'); if (src == 'PS-DUP') { return 'magenta'; } else if (src == 'Non-coding'){ return 'red'; } return 'goldenrod'; } However this still doesn’t work. I tried printing to the console the value of the ‘src’ variable to see if it’s picking up something and it does at least for one of the two conditions I have (PS-DUP), so not perfect I suppose. Maybe I’m missing some conditional code somewhere in the JBrowse source code that keep overwriting something as it seems to add red either to the main color or the ‘clip colour’ to the gene models. That’s why I simply picked red as one of my colors to give in to this phenomenon since it seems like it’s targeting non-coding transcripts anyways. Is this functionality any easier in JBrowse2? I’m beginning to setup a version of JBrowse2 slowly, which is why I ask. Coloring gene model tracks has always been a tricky thing for me, any help anyone can provide would be great. Thanks, Vaneet From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 13, 2023 5:19 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] I am reasonably sure that syntax is right; it turns out that function is no longer used in our site, but I found a current track that has this callback: "color" : "function(f) {var type = f._parent.get('predictiontype'); if (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return 'lightsalmon';} return 'purple'; }" BUT!!!! This applies to features that only have a parent and a child; coloring genes is even more tricky. I forgot that I'd run into some difficulties with how JBrowse was representing genes (at least 6 or 7 years ago), so I ended up writing my own Gene glyph that handles coloring among other things: https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs I don't think you'll need to do this though, but I can't remember how to deal with it. Colin, help :-) Scott On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: I suppose I can just tag everything to the transcript as that seems to work. How do you override that default behavior of JBrowse trying to estimate that a transcript is non-coding and colors it red? Even when I can successfully change the color using my callback function, that red color remains for some transcripts where JBrowse is controlling it. Even when I try to manually change it via 'Edit config' in a temporary session it doesn't change the red. Thanks, Vaneet ________________________________ From: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Sent: September 13, 2023 3:36 PM To: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: [Gmod-ajax] JBrowse callback functions used for track color [△EXTERNAL] Hey Scott, Is that the right syntax for calling the parent gene feature: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } I'm asking because it results in this error from my browser console: Uncaught TypeError: feature._parent is undefined I tried without the period or without the underscore, still finds it undefined. Thanks, Vaneet ________________________________ From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 13, 2023 12:02 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi Scott, If you or anyone in the JBrowse community can help me with this, I’d appreciate it. I’ve used callback functions before successfully to add links within the ‘View details’ box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I’ve done is added a ‘tag’ attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", “color” : “{customColor}” }, I’ve done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it’s possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Colin <col...@gm...> - 2023-09-27 13:21:40
|
Good catch. I'll update the docs probably to request a later version of node (or try to make the code re-support the older node) -Colin On Tue, Sep 26, 2023 at 7:08 PM Vaneet Lotay <van...@uc...> wrote: > Thanks Colin, that was the issue. I’ve upgraded to Node v20. I only > stuck with my current version as the JBrowse instructions mentioned that > Node v12+ was fine. > > > > Thank you, > > > > Vaneet > > > > *From:* Colin <col...@gm...> > *Sent:* September 26, 2023 4:01 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: [Gmod-ajax] JBrowse 2 setup: jbrowse command fails > > > > [△EXTERNAL] > > > > Can you check what version of "node" you have? Run > > > > node --version > > > > We recommend you get the latest node.js e.g. v20 > > > > There are multiple options for installing nodejs but one option is for > example listed here > https://github.com/nodesource/distributions#installation-instructions > > > > -Colin > > > > > > > > On Tue, Sep 26, 2023 at 4:17 PM Vaneet Lotay <van...@uc...> > wrote: > > Hi all, > > > > I’ve just begun to start setting up and installing JBrowse 2. I thought I > had installed it properly but I notice now that my jbrowse command fails > every time it’s run with Syntax Errors, no matter which sub-command I use. > Here are some examples: > > > > jbrowse create jbrowse2 > > > > *SyntaxError: Unexpected token '.'* > > > > jbrowse upgrade > > > > *SyntaxError: Unexpected token '('* > > > > jbrowse add-assembly genome.fa --load copy --out /var/www/html/jbrowse/ > > > > *SyntaxError: Unexpected token '.'* > > > > For adding the assembly I used the actual URL of my genome fasta file > after the indexes were created with samtools. I got around the first > command failing by manually downloading and placing the newest edition of > JBrowse2 in my desired directory. However using the ‘jbrowse’ command is > obviously fundamental to operating JBrowse2 and adding tracks and genomes, > so I need that to work. Not sure if something in the underlying JBrowse2 > code is causing this error. > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > > |
From: Vaneet L. <van...@uc...> - 2023-09-26 23:08:46
|
Thanks Colin, that was the issue. I’ve upgraded to Node v20. I only stuck with my current version as the JBrowse instructions mentioned that Node v12+ was fine. Thank you, Vaneet From: Colin <col...@gm...> Sent: September 26, 2023 4:01 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... Subject: Re: [Gmod-ajax] JBrowse 2 setup: jbrowse command fails [△EXTERNAL] Can you check what version of "node" you have? Run node --version We recommend you get the latest node.js e.g. v20 There are multiple options for installing nodejs but one option is for example listed here https://github.com/nodesource/distributions#installation-instructions -Colin On Tue, Sep 26, 2023 at 4:17 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi all, I’ve just begun to start setting up and installing JBrowse 2. I thought I had installed it properly but I notice now that my jbrowse command fails every time it’s run with Syntax Errors, no matter which sub-command I use. Here are some examples: jbrowse create jbrowse2 SyntaxError: Unexpected token '.' jbrowse upgrade SyntaxError: Unexpected token '(' jbrowse add-assembly genome.fa --load copy --out /var/www/html/jbrowse/ SyntaxError: Unexpected token '.' For adding the assembly I used the actual URL of my genome fasta file after the indexes were created with samtools. I got around the first command failing by manually downloading and placing the newest edition of JBrowse2 in my desired directory. However using the ‘jbrowse’ command is obviously fundamental to operating JBrowse2 and adding tracks and genomes, so I need that to work. Not sure if something in the underlying JBrowse2 code is causing this error. Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA _______________________________________________ Gmod-ajax mailing list Gmo...@li...<mailto:Gmo...@li...> https://lists.sourceforge.net/lists/listinfo/gmod-ajax |
From: Colin <col...@gm...> - 2023-09-26 22:01:10
|
Can you check what version of "node" you have? Run node --version We recommend you get the latest node.js e.g. v20 There are multiple options for installing nodejs but one option is for example listed here https://github.com/nodesource/distributions#installation-instructions -Colin On Tue, Sep 26, 2023 at 4:17 PM Vaneet Lotay <van...@uc...> wrote: > Hi all, > > > > I’ve just begun to start setting up and installing JBrowse 2. I thought I > had installed it properly but I notice now that my jbrowse command fails > every time it’s run with Syntax Errors, no matter which sub-command I use. > Here are some examples: > > > > jbrowse create jbrowse2 > > > > *SyntaxError: Unexpected token '.'* > > > > jbrowse upgrade > > > > *SyntaxError: Unexpected token '('* > > > > jbrowse add-assembly genome.fa --load copy --out /var/www/html/jbrowse/ > > > > *SyntaxError: Unexpected token '.'* > > > > For adding the assembly I used the actual URL of my genome fasta file > after the indexes were created with samtools. I got around the first > command failing by manually downloading and placing the newest edition of > JBrowse2 in my desired directory. However using the ‘jbrowse’ command is > obviously fundamental to operating JBrowse2 and adding tracks and genomes, > so I need that to work. Not sure if something in the underlying JBrowse2 > code is causing this error. > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |
From: Scott C. <sc...@sc...> - 2023-09-26 21:14:22
|
Hi Vaneet, I think I've at least gotten close. There are a few tricks: you can specify a list of transcript types that are noncoding, and you can specify what the noncoding transcripts are colored with a callback, so I have this snippet of a config: "noncodingType" : ["transcript","lnc_RNA","miRNA","pseudogene","rRNA","snRNA","snoRNA","tRNA"], "style" : { "className" : "feature", "unprocessedTranscriptColor" : "function(feature) {var tag = feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if (tag == 'non-coding' ) {return 'red'}; return 'blue';}", "color" : "function(feature) {console.log(feature); var tag = feature.get('tag');if (tag == 'pseudoduplicate') {return 'magenta';} if (tag == 'non-coding' ) {return 'red'}; return 'goldenrod';}" }, I'm not positive you wanted the 'transcript' transcripts to be coding or not, so I included them in noncoding. Also, I noticed that sometimes mRNAs have tag attributes too, so I wrote the callback for both color and unprocessedTranscriptColor. Anyway, this should get you close to what you're looking for. Scott On Mon, Sep 25, 2023 at 11:31 AM Vaneet Lotay <van...@uc...> wrote: > Hey Scott, > > > > You can access my GFF3 files here: > > > > https://bigfrog.xenbase.org/pub/xenbase/genomics/share/ > > > > So the ‘transcript-tagged’ GFF3 is where I added a ‘tag’ attribute to the 9 > th column at the transcript level as you were saying these callback > functions usually access features at the transcript level. > > > > When that wasn’t working I changed the values in the source column (2nd > column) to hold my tags which is what the ‘source-tagged’ GFF3 has. This > is for the echinoderm S. purpuratus v5.0 genome. Do you need the genome > sequence file as well? > > > > Thanks for looking into this, appreciate it! > > > > Vaneet > > > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 21, 2023 2:03 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hi Vaneet, > > > > Sorry this is being such a pain. Can you send me a url to your GFF? I'll > try setting up a test instance to see if I can sort it out. > > > > Scott > > > > > > On Thu, Sep 21, 2023 at 10:27 AM Vaneet Lotay <van...@uc...> > wrote: > > I still can’t get it to work properly. Since you had mentioned that > JBrowse extracts the feature at the transcript level I tagged these genes > at the transcript as well as the parent gene level in the GFF3. Also I > decided to add the tag in the ‘source’ column in the GFF3 as that had > worked for me in the past and perhaps easier to extract: > > > > customColor = function(feature) { > > var src = feature.get('source'); > > if (src == 'PS-DUP') { > > return 'magenta'; > > } else if (src == 'Non-coding'){ > > return 'red'; > > } > > return 'goldenrod'; > > } > > > > However this still doesn’t work. I tried printing to the console the > value of the ‘src’ variable to see if it’s picking up something and it does > at least for one of the two conditions I have (PS-DUP), so not perfect I > suppose. Maybe I’m missing some conditional code somewhere in the JBrowse > source code that keep overwriting something as it seems to add red either > to the main color or the ‘clip colour’ to the gene models. That’s why I > simply picked red as one of my colors to give in to this phenomenon since > it seems like it’s targeting non-coding transcripts anyways. Is this > functionality any easier in JBrowse2? I’m beginning to setup a version of > JBrowse2 slowly, which is why I ask. > > > > Coloring gene model tracks has always been a tricky thing for me, any help > anyone can provide would be great. > > > > Thanks, > > > Vaneet > > > > > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 5:19 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > I am reasonably sure that syntax is right; it turns out that function is > no longer used in our site, but I found a current track that has this > callback: > > > > "color" : "function(f) {var type = f._parent.get('predictiontype'); if > (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return > 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == > 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return > 'lightsalmon';} return 'purple'; }" > > > > BUT!!!! This applies to features that only have a parent and a child; > coloring genes is even more tricky. I forgot that I'd run into some > difficulties with how JBrowse was representing genes (at least 6 or 7 years > ago), so I ended up writing my own Gene glyph that handles coloring among > other things: > > > > > https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs > > > > I don't think you'll need to do this though, but I can't remember how to > deal with it. > > > > Colin, help :-) > > > > Scott > > > > > > > > On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...> > wrote: > > I suppose I can just tag everything to the transcript as that seems to > work. How do you override that default behavior of JBrowse trying to > estimate that a transcript is non-coding and colors it red? Even when I > can successfully change the color using my callback function, that red > color remains for some transcripts where JBrowse is controlling it. Even > when I try to manually change it via 'Edit config' in a temporary session > it doesn't change the red. > > > > Thanks, > > > > Vaneet > ------------------------------ > > *From:* Vaneet Lotay <van...@uc...> > *Sent:* September 13, 2023 3:36 PM > *To:* Scott Cain <sc...@sc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: [Gmod-ajax] JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hey Scott, > > > > Is that the right syntax for calling the parent gene feature: > > > > > > > > > > > > > > *parentRainbowHeatMap = function(feature) { var score = > feature._parent.get('score'); var max = 0.01; var min = 2.50; > if(score<max) {score = max;} if (score >min) {score = min;} var > blueness = 190*((score-min)/(max-min)); var hex = > Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + > hex; } var color = '#' + hex + hex + 'DD'; return color; }* > > > > I'm asking because it results in this error from my browser console: > > > > *Uncaught TypeError: feature._parent is undefined* > > > > I tried without the period or without the underscore, still finds it > undefined. > > > > Thanks, > > > Vaneet > ------------------------------ > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 12:02 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hi Vaneet, > > > > Coloring things in gene tracks can be tricky; the feature that is being > considered when the color is applied is (I think) the transcript-level > feature, not the parent gene. So if you've attached an attribute to the > parent gene that you want to use, you actually have to get the parent > feature first. As an example, I have this function: > > > > parentRainbowHeatMap = function(feature) { > var score = feature._parent.get('score'); > var max = 0.01; > var min = 2.50; > if(score<max) {score = max;} > if (score >min) {score = min;} > var blueness = 190*((score-min)/(max-min)); > var hex = Math.round(blueness).toString(16); > if (hex.length < 2) { hex = '0' + hex; } > var color = '#' + hex + hex + 'DD'; > return color; } > > > > that gets the parent feature's score in order to determine the color of > the transcript. > > > > For the red transcripts--I think the gene glyph is trying to determine if > a transcript is noncoding and if it thinks it is, it colors it red. I'm not > positive about that though--I pretty much never use the default color in > gene tracks :-) > > > > Scott > > > > > > On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...> > wrote: > > Hi Scott, > > > > If you or anyone in the JBrowse community can help me with this, I’d > appreciate it. I’ve used callback functions before successfully to add > links within the ‘View details’ box for various attributes. Now what I > would like to do is color specific genes in my GFF3 a certain color > depending on a certain attribute. What I’ve done is added a ‘tag’ > attribute that would indicate whether the gene is a non-coding gene or not > as well as other types, like so at the end of the 9th column of the GFF3: > > > > > ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding > > > > Then I defined a callback function which would extract this attribute and > pick the color based on the value, while keeping what I believe is the > default JBrowse track color as the backup option (goldenrod): > > > > customColor = function(feature) { > > gtag = feature.get('tag'); > > if (gtag == 'pseudoduplicate') { > > return 'magenta'; > > } else if (gtag == 'non-coding'){ > > return 'green'; > > } else{ > > return 'goldenrod'; > > } > > return 'goldenrod'; > > } > > > > Then under the style stanza of the track I added the call to the function: > > > > "style" : { > > "className" : "feature", > > “color” : “{customColor}” > > }, > > > > I’ve done this for other callback functions successfully, but perhaps > coloring the track behaves differently. I might also be not extracting the > attribute properly from the GFF or my code has errors, please let me know > if this is the case. I have been able to extract other attributes from the > 9th column of GFF3 before so I know it’s possible, but just not working > as expected here. Also it seems some of my gene models already seem to be > colored red for some reason without this callback function even being used > as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, > can you explain why that happens? > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager ( https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-26 20:16:58
|
Hi all, I've just begun to start setting up and installing JBrowse 2. I thought I had installed it properly but I notice now that my jbrowse command fails every time it's run with Syntax Errors, no matter which sub-command I use. Here are some examples: jbrowse create jbrowse2 SyntaxError: Unexpected token '.' jbrowse upgrade SyntaxError: Unexpected token '(' jbrowse add-assembly genome.fa --load copy --out /var/www/html/jbrowse/ SyntaxError: Unexpected token '.' For adding the assembly I used the actual URL of my genome fasta file after the indexes were created with samtools. I got around the first command failing by manually downloading and placing the newest edition of JBrowse2 in my desired directory. However using the 'jbrowse' command is obviously fundamental to operating JBrowse2 and adding tracks and genomes, so I need that to work. Not sure if something in the underlying JBrowse2 code is causing this error. Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA |
From: Vaneet L. <van...@uc...> - 2023-09-25 18:31:12
|
Hey Scott, You can access my GFF3 files here: https://bigfrog.xenbase.org/pub/xenbase/genomics/share/ So the ‘transcript-tagged’ GFF3 is where I added a ‘tag’ attribute to the 9th column at the transcript level as you were saying these callback functions usually access features at the transcript level. When that wasn’t working I changed the values in the source column (2nd column) to hold my tags which is what the ‘source-tagged’ GFF3 has. This is for the echinoderm S. purpuratus v5.0 genome. Do you need the genome sequence file as well? Thanks for looking into this, appreciate it! Vaneet From: Scott Cain <sc...@sc...> Sent: September 21, 2023 2:03 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Sorry this is being such a pain. Can you send me a url to your GFF? I'll try setting up a test instance to see if I can sort it out. Scott On Thu, Sep 21, 2023 at 10:27 AM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: I still can’t get it to work properly. Since you had mentioned that JBrowse extracts the feature at the transcript level I tagged these genes at the transcript as well as the parent gene level in the GFF3. Also I decided to add the tag in the ‘source’ column in the GFF3 as that had worked for me in the past and perhaps easier to extract: customColor = function(feature) { var src = feature.get('source'); if (src == 'PS-DUP') { return 'magenta'; } else if (src == 'Non-coding'){ return 'red'; } return 'goldenrod'; } However this still doesn’t work. I tried printing to the console the value of the ‘src’ variable to see if it’s picking up something and it does at least for one of the two conditions I have (PS-DUP), so not perfect I suppose. Maybe I’m missing some conditional code somewhere in the JBrowse source code that keep overwriting something as it seems to add red either to the main color or the ‘clip colour’ to the gene models. That’s why I simply picked red as one of my colors to give in to this phenomenon since it seems like it’s targeting non-coding transcripts anyways. Is this functionality any easier in JBrowse2? I’m beginning to setup a version of JBrowse2 slowly, which is why I ask. Coloring gene model tracks has always been a tricky thing for me, any help anyone can provide would be great. Thanks, Vaneet From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 13, 2023 5:19 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] I am reasonably sure that syntax is right; it turns out that function is no longer used in our site, but I found a current track that has this callback: "color" : "function(f) {var type = f._parent.get('predictiontype'); if (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return 'lightsalmon';} return 'purple'; }" BUT!!!! This applies to features that only have a parent and a child; coloring genes is even more tricky. I forgot that I'd run into some difficulties with how JBrowse was representing genes (at least 6 or 7 years ago), so I ended up writing my own Gene glyph that handles coloring among other things: https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs I don't think you'll need to do this though, but I can't remember how to deal with it. Colin, help :-) Scott On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: I suppose I can just tag everything to the transcript as that seems to work. How do you override that default behavior of JBrowse trying to estimate that a transcript is non-coding and colors it red? Even when I can successfully change the color using my callback function, that red color remains for some transcripts where JBrowse is controlling it. Even when I try to manually change it via 'Edit config' in a temporary session it doesn't change the red. Thanks, Vaneet ________________________________ From: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Sent: September 13, 2023 3:36 PM To: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: [Gmod-ajax] JBrowse callback functions used for track color [△EXTERNAL] Hey Scott, Is that the right syntax for calling the parent gene feature: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } I'm asking because it results in this error from my browser console: Uncaught TypeError: feature._parent is undefined I tried without the period or without the underscore, still finds it undefined. Thanks, Vaneet ________________________________ From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 13, 2023 12:02 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi Scott, If you or anyone in the JBrowse community can help me with this, I’d appreciate it. I’ve used callback functions before successfully to add links within the ‘View details’ box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I’ve done is added a ‘tag’ attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", “color” : “{customColor}” }, I’ve done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it’s possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Garrett S. <ste...@gm...> - 2023-09-21 21:33:18
|
Hi Hans, Because GTF tracks do not have an index, JBrowse tries to load the whole file, which in your case is too large to handle. I'd suggest converting your GTF to GFF3 and then creating an index for it and using that for your track. You can find more information about adding an indexed GFF3 track here: https://jbrowse.org/jb2/docs/quickstart_web/#adding-a-gff3-file-with-gff3tabix Best, Garrett On Thu, Sep 21, 2023 at 3:04 PM Hans Vasquez-Gross <hva...@un...> wrote: > Hi All, > > I am loading a new genome reference, the Human T2T reference downloaded > from NCBI. The alignment track data loads fine, but when I click on the GTF > track, I get the error: Data exceeds maximum string length (512MB). Any > suggestion what could be the cause of this issue? > > You can see the installation here: > > https://biox.unr.edu/jbrowse2/Human_T2T/ > > Thank you, > -Hans > > -- > > > > [image: signature_998258195] > > *Hans Vasquez-Gross, Ph.D* > > Bioinformatics Scientist, > Nevada Bioinformatics Center > > https://www.unr.edu/bioinformatics > > hva...@un... > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |
From: Hans Vasquez-G. <hva...@un...> - 2023-09-21 21:04:21
|
Hi All, I am loading a new genome reference, the Human T2T reference downloaded from NCBI. The alignment track data loads fine, but when I click on the GTF track, I get the error: Data exceeds maximum string length (512MB). Any suggestion what could be the cause of this issue? You can see the installation here: https://biox.unr.edu/jbrowse2/Human_T2T/ Thank you, -Hans -- [signature_998258195] Hans Vasquez-Gross, Ph.D Bioinformatics Scientist, Nevada Bioinformatics Center https://www.unr.edu/bioinformatics hva...@un...<mailto:hva...@un...> |
From: Scott C. <sc...@sc...> - 2023-09-21 20:03:10
|
Hi Vaneet, Sorry this is being such a pain. Can you send me a url to your GFF? I'll try setting up a test instance to see if I can sort it out. Scott On Thu, Sep 21, 2023 at 10:27 AM Vaneet Lotay <van...@uc...> wrote: > I still can’t get it to work properly. Since you had mentioned that > JBrowse extracts the feature at the transcript level I tagged these genes > at the transcript as well as the parent gene level in the GFF3. Also I > decided to add the tag in the ‘source’ column in the GFF3 as that had > worked for me in the past and perhaps easier to extract: > > > > customColor = function(feature) { > > var src = feature.get('source'); > > if (src == 'PS-DUP') { > > return 'magenta'; > > } else if (src == 'Non-coding'){ > > return 'red'; > > } > > return 'goldenrod'; > > } > > > > However this still doesn’t work. I tried printing to the console the > value of the ‘src’ variable to see if it’s picking up something and it does > at least for one of the two conditions I have (PS-DUP), so not perfect I > suppose. Maybe I’m missing some conditional code somewhere in the JBrowse > source code that keep overwriting something as it seems to add red either > to the main color or the ‘clip colour’ to the gene models. That’s why I > simply picked red as one of my colors to give in to this phenomenon since > it seems like it’s targeting non-coding transcripts anyways. Is this > functionality any easier in JBrowse2? I’m beginning to setup a version of > JBrowse2 slowly, which is why I ask. > > > > Coloring gene model tracks has always been a tricky thing for me, any help > anyone can provide would be great. > > > > Thanks, > > > Vaneet > > > > > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 5:19 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > I am reasonably sure that syntax is right; it turns out that function is > no longer used in our site, but I found a current track that has this > callback: > > > > "color" : "function(f) {var type = f._parent.get('predictiontype'); if > (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return > 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == > 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return > 'lightsalmon';} return 'purple'; }" > > > > BUT!!!! This applies to features that only have a parent and a child; > coloring genes is even more tricky. I forgot that I'd run into some > difficulties with how JBrowse was representing genes (at least 6 or 7 years > ago), so I ended up writing my own Gene glyph that handles coloring among > other things: > > > > > https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs > > > > I don't think you'll need to do this though, but I can't remember how to > deal with it. > > > > Colin, help :-) > > > > Scott > > > > > > > > On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...> > wrote: > > I suppose I can just tag everything to the transcript as that seems to > work. How do you override that default behavior of JBrowse trying to > estimate that a transcript is non-coding and colors it red? Even when I > can successfully change the color using my callback function, that red > color remains for some transcripts where JBrowse is controlling it. Even > when I try to manually change it via 'Edit config' in a temporary session > it doesn't change the red. > > > > Thanks, > > > > Vaneet > ------------------------------ > > *From:* Vaneet Lotay <van...@uc...> > *Sent:* September 13, 2023 3:36 PM > *To:* Scott Cain <sc...@sc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: [Gmod-ajax] JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hey Scott, > > > > Is that the right syntax for calling the parent gene feature: > > > > > > > > > > > > > > *parentRainbowHeatMap = function(feature) { var score = > feature._parent.get('score'); var max = 0.01; var min = 2.50; > if(score<max) {score = max;} if (score >min) {score = min;} var > blueness = 190*((score-min)/(max-min)); var hex = > Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + > hex; } var color = '#' + hex + hex + 'DD'; return color; }* > > > > I'm asking because it results in this error from my browser console: > > > > *Uncaught TypeError: feature._parent is undefined* > > > > I tried without the period or without the underscore, still finds it > undefined. > > > > Thanks, > > > Vaneet > ------------------------------ > > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 12:02 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: JBrowse callback functions used for track color > > > > [△EXTERNAL] > > > > Hi Vaneet, > > > > Coloring things in gene tracks can be tricky; the feature that is being > considered when the color is applied is (I think) the transcript-level > feature, not the parent gene. So if you've attached an attribute to the > parent gene that you want to use, you actually have to get the parent > feature first. As an example, I have this function: > > > > parentRainbowHeatMap = function(feature) { > var score = feature._parent.get('score'); > var max = 0.01; > var min = 2.50; > if(score<max) {score = max;} > if (score >min) {score = min;} > var blueness = 190*((score-min)/(max-min)); > var hex = Math.round(blueness).toString(16); > if (hex.length < 2) { hex = '0' + hex; } > var color = '#' + hex + hex + 'DD'; > return color; } > > > > that gets the parent feature's score in order to determine the color of > the transcript. > > > > For the red transcripts--I think the gene glyph is trying to determine if > a transcript is noncoding and if it thinks it is, it colors it red. I'm not > positive about that though--I pretty much never use the default color in > gene tracks :-) > > > > Scott > > > > > > On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...> > wrote: > > Hi Scott, > > > > If you or anyone in the JBrowse community can help me with this, I’d > appreciate it. I’ve used callback functions before successfully to add > links within the ‘View details’ box for various attributes. Now what I > would like to do is color specific genes in my GFF3 a certain color > depending on a certain attribute. What I’ve done is added a ‘tag’ > attribute that would indicate whether the gene is a non-coding gene or not > as well as other types, like so at the end of the 9th column of the GFF3: > > > > > ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding > > > > Then I defined a callback function which would extract this attribute and > pick the color based on the value, while keeping what I believe is the > default JBrowse track color as the backup option (goldenrod): > > > > customColor = function(feature) { > > gtag = feature.get('tag'); > > if (gtag == 'pseudoduplicate') { > > return 'magenta'; > > } else if (gtag == 'non-coding'){ > > return 'green'; > > } else{ > > return 'goldenrod'; > > } > > return 'goldenrod'; > > } > > > > Then under the style stanza of the track I added the call to the function: > > > > "style" : { > > "className" : "feature", > > “color” : “{customColor}” > > }, > > > > I’ve done this for other callback functions successfully, but perhaps > coloring the track behaves differently. I might also be not extracting the > attribute properly from the GFF or my code has errors, please let me know > if this is the case. I have been able to extract other attributes from the > 9th column of GFF3 before so I know it’s possible, but just not working > as expected here. Also it seems some of my gene models already seem to be > colored red for some reason without this callback function even being used > as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, > can you explain why that happens? > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > > > > -- > > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > > WormBase Developer (http://wormbase.org/) > > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager ( https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-21 17:27:57
|
I still can’t get it to work properly. Since you had mentioned that JBrowse extracts the feature at the transcript level I tagged these genes at the transcript as well as the parent gene level in the GFF3. Also I decided to add the tag in the ‘source’ column in the GFF3 as that had worked for me in the past and perhaps easier to extract: customColor = function(feature) { var src = feature.get('source'); if (src == 'PS-DUP') { return 'magenta'; } else if (src == 'Non-coding'){ return 'red'; } return 'goldenrod'; } However this still doesn’t work. I tried printing to the console the value of the ‘src’ variable to see if it’s picking up something and it does at least for one of the two conditions I have (PS-DUP), so not perfect I suppose. Maybe I’m missing some conditional code somewhere in the JBrowse source code that keep overwriting something as it seems to add red either to the main color or the ‘clip colour’ to the gene models. That’s why I simply picked red as one of my colors to give in to this phenomenon since it seems like it’s targeting non-coding transcripts anyways. Is this functionality any easier in JBrowse2? I’m beginning to setup a version of JBrowse2 slowly, which is why I ask. Coloring gene model tracks has always been a tricky thing for me, any help anyone can provide would be great. Thanks, Vaneet From: Scott Cain <sc...@sc...> Sent: September 13, 2023 5:19 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] I am reasonably sure that syntax is right; it turns out that function is no longer used in our site, but I found a current track that has this callback: "color" : "function(f) {var type = f._parent.get('predictiontype'); if (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return 'lightsalmon';} return 'purple'; }" BUT!!!! This applies to features that only have a parent and a child; coloring genes is even more tricky. I forgot that I'd run into some difficulties with how JBrowse was representing genes (at least 6 or 7 years ago), so I ended up writing my own Gene glyph that handles coloring among other things: https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs I don't think you'll need to do this though, but I can't remember how to deal with it. Colin, help :-) Scott On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: I suppose I can just tag everything to the transcript as that seems to work. How do you override that default behavior of JBrowse trying to estimate that a transcript is non-coding and colors it red? Even when I can successfully change the color using my callback function, that red color remains for some transcripts where JBrowse is controlling it. Even when I try to manually change it via 'Edit config' in a temporary session it doesn't change the red. Thanks, Vaneet ________________________________ From: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Sent: September 13, 2023 3:36 PM To: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: [Gmod-ajax] JBrowse callback functions used for track color [△EXTERNAL] Hey Scott, Is that the right syntax for calling the parent gene feature: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } I'm asking because it results in this error from my browser console: Uncaught TypeError: feature._parent is undefined I tried without the period or without the underscore, still finds it undefined. Thanks, Vaneet ________________________________ From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 13, 2023 12:02 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi Scott, If you or anyone in the JBrowse community can help me with this, I’d appreciate it. I’ve used callback functions before successfully to add links within the ‘View details’ box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I’ve done is added a ‘tag’ attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", “color” : “{customColor}” }, I’ve done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it’s possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-14 22:16:29
|
Thanks for the info, I’m still not sure how to change the JBrowse default behaviour of what it believes is non-coding segments so that it doesn’t color those red. Even when I try to overwrite this functionality, the red remains. Colin or Scott, if you know how to override this behavior, please tell me. Thanks, Vaneet From: Scott Cain <sc...@sc...> Sent: September 13, 2023 5:19 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] I am reasonably sure that syntax is right; it turns out that function is no longer used in our site, but I found a current track that has this callback: "color" : "function(f) {var type = f._parent.get('predictiontype'); if (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return 'lightsalmon';} return 'purple'; }" BUT!!!! This applies to features that only have a parent and a child; coloring genes is even more tricky. I forgot that I'd run into some difficulties with how JBrowse was representing genes (at least 6 or 7 years ago), so I ended up writing my own Gene glyph that handles coloring among other things: https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs I don't think you'll need to do this though, but I can't remember how to deal with it. Colin, help :-) Scott On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: I suppose I can just tag everything to the transcript as that seems to work. How do you override that default behavior of JBrowse trying to estimate that a transcript is non-coding and colors it red? Even when I can successfully change the color using my callback function, that red color remains for some transcripts where JBrowse is controlling it. Even when I try to manually change it via 'Edit config' in a temporary session it doesn't change the red. Thanks, Vaneet ________________________________ From: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Sent: September 13, 2023 3:36 PM To: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: [Gmod-ajax] JBrowse callback functions used for track color [△EXTERNAL] Hey Scott, Is that the right syntax for calling the parent gene feature: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } I'm asking because it results in this error from my browser console: Uncaught TypeError: feature._parent is undefined I tried without the period or without the underscore, still finds it undefined. Thanks, Vaneet ________________________________ From: Scott Cain <sc...@sc...<mailto:sc...@sc...>> Sent: September 13, 2023 12:02 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> <gmo...@li...<mailto:gmo...@li...>> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi Scott, If you or anyone in the JBrowse community can help me with this, I’d appreciate it. I’ve used callback functions before successfully to add links within the ‘View details’ box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I’ve done is added a ‘tag’ attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", “color” : “{customColor}” }, I’ve done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it’s possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Scott C. <sc...@sc...> - 2023-09-13 23:43:30
|
I am reasonably sure that syntax is right; it turns out that function is no longer used in our site, but I found a current track that has this callback: "color" : "function(f) {var type = f._parent.get('predictiontype'); if (type == 'tmhmm') {return 'magenta';} if (type == 'seg') {return 'lightseagreen';} if (type == 'signalp') {return 'aquamarine'} if (type == 'ncoils') {return 'chartreuse';} if (type == 'pfam') {return 'lightsalmon';} return 'purple'; }" BUT!!!! This applies to features that only have a parent and a child; coloring genes is even more tricky. I forgot that I'd run into some difficulties with how JBrowse was representing genes (at least 6 or 7 years ago), so I ended up writing my own Gene glyph that handles coloring among other things: https://github.com/WormBase/website-genome-browsers/tree/jbrowse-production/jbrowse/jbrowse/plugins/wormbase-glyphs I don't think you'll need to do this though, but I can't remember how to deal with it. Colin, help :-) Scott On Wed, Sep 13, 2023 at 3:30 PM Vaneet Lotay <van...@uc...> wrote: > I suppose I can just tag everything to the transcript as that seems to > work. How do you override that default behavior of JBrowse trying to > estimate that a transcript is non-coding and colors it red? Even when I > can successfully change the color using my callback function, that red > color remains for some transcripts where JBrowse is controlling it. Even > when I try to manually change it via 'Edit config' in a temporary session > it doesn't change the red. > > Thanks, > > Vaneet > ------------------------------ > *From:* Vaneet Lotay <van...@uc...> > *Sent:* September 13, 2023 3:36 PM > *To:* Scott Cain <sc...@sc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: [Gmod-ajax] JBrowse callback functions used for track color > > [△EXTERNAL] > > Hey Scott, > > Is that the right syntax for calling the parent gene feature: > > > > > > > > > > > > *parentRainbowHeatMap = function(feature) { var score = > feature._parent.get('score'); var max = 0.01; var min = 2.50; > if(score<max) {score = max;} if (score >min) {score = min;} var > blueness = 190*((score-min)/(max-min)); var hex = > Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + > hex; } var color = '#' + hex + hex + 'DD'; return color; }* > > I'm asking because it results in this error from my browser console: > > *Uncaught TypeError: feature._parent is undefined* > > I tried without the period or without the underscore, still finds it > undefined. > > Thanks, > > Vaneet > ------------------------------ > *From:* Scott Cain <sc...@sc...> > *Sent:* September 13, 2023 12:02 PM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... <gmo...@li...> > *Subject:* Re: JBrowse callback functions used for track color > > [△EXTERNAL] > > Hi Vaneet, > > Coloring things in gene tracks can be tricky; the feature that is being > considered when the color is applied is (I think) the transcript-level > feature, not the parent gene. So if you've attached an attribute to the > parent gene that you want to use, you actually have to get the parent > feature first. As an example, I have this function: > > parentRainbowHeatMap = function(feature) { > var score = feature._parent.get('score'); > var max = 0.01; > var min = 2.50; > if(score<max) {score = max;} > if (score >min) {score = min;} > var blueness = 190*((score-min)/(max-min)); > var hex = Math.round(blueness).toString(16); > if (hex.length < 2) { hex = '0' + hex; } > var color = '#' + hex + hex + 'DD'; > return color; } > > that gets the parent feature's score in order to determine the color of > the transcript. > > For the red transcripts--I think the gene glyph is trying to determine if > a transcript is noncoding and if it thinks it is, it colors it red. I'm not > positive about that though--I pretty much never use the default color in > gene tracks :-) > > Scott > > > On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...> > wrote: > > Hi Scott, > > > > If you or anyone in the JBrowse community can help me with this, I’d > appreciate it. I’ve used callback functions before successfully to add > links within the ‘View details’ box for various attributes. Now what I > would like to do is color specific genes in my GFF3 a certain color > depending on a certain attribute. What I’ve done is added a ‘tag’ > attribute that would indicate whether the gene is a non-coding gene or not > as well as other types, like so at the end of the 9th column of the GFF3: > > > > > ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding > > > > Then I defined a callback function which would extract this attribute and > pick the color based on the value, while keeping what I believe is the > default JBrowse track color as the backup option (goldenrod): > > > > customColor = function(feature) { > > gtag = feature.get('tag'); > > if (gtag == 'pseudoduplicate') { > > return 'magenta'; > > } else if (gtag == 'non-coding'){ > > return 'green'; > > } else{ > > return 'goldenrod'; > > } > > return 'goldenrod'; > > } > > > > Then under the style stanza of the track I added the call to the function: > > > > "style" : { > > "className" : "feature", > > “color” : “{customColor}” > > }, > > > > I’ve done this for other callback functions successfully, but perhaps > coloring the track behaves differently. I might also be not extracting the > attribute properly from the GFF or my code has errors, please let me know > if this is the case. I have been able to extract other attributes from the > 9th column of GFF3 before so I know it’s possible, but just not working > as expected here. Also it seems some of my gene models already seem to be > colored red for some reason without this callback function even being used > as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, > can you explain why that happens? > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > > > > -- > ------------------------------------------------------------------------ > Scott Cain, Ph. D. scott > at scottcain dot net > GMOD Project Manager (http://gmod.org/) > 216-392-3087 > WormBase Developer (http://wormbase.org/) > Alliance of Genome Resources Group Leader (http://alliancegenome.org/) > VirusSeq Project Manager (https://virusseq-dataportal.ca/) > Human Cancer Models Initiative Project Manager ( > https://hcmi-searchable-catalog.nci.nih.gov/) > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager ( https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-13 22:46:02
|
I suppose I can just tag everything to the transcript as that seems to work. How do you override that default behavior of JBrowse trying to estimate that a transcript is non-coding and colors it red? Even when I can successfully change the color using my callback function, that red color remains for some transcripts where JBrowse is controlling it. Even when I try to manually change it via 'Edit config' in a temporary session it doesn't change the red. Thanks, Vaneet ________________________________ From: Vaneet Lotay <van...@uc...> Sent: September 13, 2023 3:36 PM To: Scott Cain <sc...@sc...> Cc: gmo...@li... <gmo...@li...> Subject: Re: [Gmod-ajax] JBrowse callback functions used for track color [△EXTERNAL] Hey Scott, Is that the right syntax for calling the parent gene feature: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } I'm asking because it results in this error from my browser console: Uncaught TypeError: feature._parent is undefined I tried without the period or without the underscore, still finds it undefined. Thanks, Vaneet ________________________________ From: Scott Cain <sc...@sc...> Sent: September 13, 2023 12:02 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... <gmo...@li...> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi Scott, If you or anyone in the JBrowse community can help me with this, I’d appreciate it. I’ve used callback functions before successfully to add links within the ‘View details’ box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I’ve done is added a ‘tag’ attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", “color” : “{customColor}” }, I’ve done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it’s possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-13 21:36:15
|
Hey Scott, Is that the right syntax for calling the parent gene feature: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } I'm asking because it results in this error from my browser console: Uncaught TypeError: feature._parent is undefined I tried without the period or without the underscore, still finds it undefined. Thanks, Vaneet ________________________________ From: Scott Cain <sc...@sc...> Sent: September 13, 2023 12:02 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... <gmo...@li...> Subject: Re: JBrowse callback functions used for track color [△EXTERNAL] Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi Scott, If you or anyone in the JBrowse community can help me with this, I’d appreciate it. I’ve used callback functions before successfully to add links within the ‘View details’ box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I’ve done is added a ‘tag’ attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", “color” : “{customColor}” }, I’ve done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it’s possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager (https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Scott C. <sc...@sc...> - 2023-09-13 18:32:45
|
Hi Vaneet, Coloring things in gene tracks can be tricky; the feature that is being considered when the color is applied is (I think) the transcript-level feature, not the parent gene. So if you've attached an attribute to the parent gene that you want to use, you actually have to get the parent feature first. As an example, I have this function: parentRainbowHeatMap = function(feature) { var score = feature._parent.get('score'); var max = 0.01; var min = 2.50; if(score<max) {score = max;} if (score >min) {score = min;} var blueness = 190*((score-min)/(max-min)); var hex = Math.round(blueness).toString(16); if (hex.length < 2) { hex = '0' + hex; } var color = '#' + hex + hex + 'DD'; return color; } that gets the parent feature's score in order to determine the color of the transcript. For the red transcripts--I think the gene glyph is trying to determine if a transcript is noncoding and if it thinks it is, it colors it red. I'm not positive about that though--I pretty much never use the default color in gene tracks :-) Scott On Tue, Sep 12, 2023 at 1:37 PM Vaneet Lotay <van...@uc...> wrote: > Hi Scott, > > > > If you or anyone in the JBrowse community can help me with this, I’d > appreciate it. I’ve used callback functions before successfully to add > links within the ‘View details’ box for various attributes. Now what I > would like to do is color specific genes in my GFF3 a certain color > depending on a certain attribute. What I’ve done is added a ‘tag’ > attribute that would indicate whether the gene is a non-coding gene or not > as well as other types, like so at the end of the 9th column of the GFF3: > > > > > ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding > > > > Then I defined a callback function which would extract this attribute and > pick the color based on the value, while keeping what I believe is the > default JBrowse track color as the backup option (goldenrod): > > > > customColor = function(feature) { > > gtag = feature.get('tag'); > > if (gtag == 'pseudoduplicate') { > > return 'magenta'; > > } else if (gtag == 'non-coding'){ > > return 'green'; > > } else{ > > return 'goldenrod'; > > } > > return 'goldenrod'; > > } > > > > Then under the style stanza of the track I added the call to the function: > > > > "style" : { > > "className" : "feature", > > “color” : “{customColor}” > > }, > > > > I’ve done this for other callback functions successfully, but perhaps > coloring the track behaves differently. I might also be not extracting the > attribute properly from the GFF or my code has errors, please let me know > if this is the case. I have been able to extract other attributes from the > 9th column of GFF3 before so I know it’s possible, but just not working > as expected here. Also it seems some of my gene models already seem to be > colored red for some reason without this callback function even being used > as opposed to goldenrod, I’m not sure if that’s default JBrowse behaviour, > can you explain why that happens? > > > > Thanks, > > > Vaneet > > > > *Vaneet Lotay* > > *Xenbase Bioinformatician* > > *University of Calgary* > > *2500 University Drive NW* > > *Calgary, AB T2N 1N4* > > *CANADA* > > > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Project Manager (http://gmod.org/) 216-392-3087 WormBase Developer (http://wormbase.org/) Alliance of Genome Resources Group Leader (http://alliancegenome.org/) VirusSeq Project Manager (https://virusseq-dataportal.ca/) Human Cancer Models Initiative Project Manager ( https://hcmi-searchable-catalog.nci.nih.gov/) |
From: Vaneet L. <van...@uc...> - 2023-09-12 20:51:51
|
Hi Scott, If you or anyone in the JBrowse community can help me with this, I'd appreciate it. I've used callback functions before successfully to add links within the 'View details' box for various attributes. Now what I would like to do is color specific genes in my GFF3 a certain color depending on a certain attribute. What I've done is added a 'tag' attribute that would indicate whether the gene is a non-coding gene or not as well as other types, like so at the end of the 9th column of the GFF3: ID=gene-LOC115920884;Dbxref=Echinobase:ECB-GENE-23010450,GeneID:115920884;Name=LOC115920884;gbkey=Gene;gene=LOC115920884;gene_biotype=lncRNA;tag=non-coding Then I defined a callback function which would extract this attribute and pick the color based on the value, while keeping what I believe is the default JBrowse track color as the backup option (goldenrod): customColor = function(feature) { gtag = feature.get('tag'); if (gtag == 'pseudoduplicate') { return 'magenta'; } else if (gtag == 'non-coding'){ return 'green'; } else{ return 'goldenrod'; } return 'goldenrod'; } Then under the style stanza of the track I added the call to the function: "style" : { "className" : "feature", "color" : "{customColor}" }, I've done this for other callback functions successfully, but perhaps coloring the track behaves differently. I might also be not extracting the attribute properly from the GFF or my code has errors, please let me know if this is the case. I have been able to extract other attributes from the 9th column of GFF3 before so I know it's possible, but just not working as expected here. Also it seems some of my gene models already seem to be colored red for some reason without this callback function even being used as opposed to goldenrod, I'm not sure if that's default JBrowse behaviour, can you explain why that happens? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA |
From: Ke J. <bio...@gm...> - 2023-08-21 19:46:35
|
Hi, I used to be able to set up such services using SeqeunceServer ( https://sequenceserver.com/), also leveraging JBrowse1's URL encoding. I have not tried this combination for JBrowse2, but with similar URL encoding capabilities, I think this might still work. Thanks! Ke On Sat, Aug 19, 2023 at 1:10 AM Hans Vasquez-Gross <hva...@un...> wrote: > Hi All, > > Is there a web package for BLAST that will integrate into JBrowse2? I > would like something where a user could submit a target gene of interest, > BLAST to a particular database, then open a view with a custom track with > where it hits. > > ~7 years ago I wrote a php script that used URL encoding with jbrowse1 in > my previous lab. However, I'm wondering if there is a better solution for > JBrowse2. > > Thank you, > -Hans > > -- > > > > [image: signature_998258195] > > *Hans Vasquez-Gross, Ph.D* > > Bioinformatics Scientist, > Nevada Bioinformatics Center > > https://www.unr.edu/bioinformatics > > hva...@un... > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |
From: Colin <col...@gm...> - 2023-08-19 14:18:32
|
There is not any particularly new integrated solution that I'm aware of, but you can probably take the same approach you had for jbrowse 1 and update it for jbrowse 2 using the URL query param api https://jbrowse.org/jb2/docs/urlparams/ On Sat, Aug 19, 2023, 2:10 AM Hans Vasquez-Gross <hva...@un...> wrote: > Hi All, > > Is there a web package for BLAST that will integrate into JBrowse2? I > would like something where a user could submit a target gene of interest, > BLAST to a particular database, then open a view with a custom track with > where it hits. > > ~7 years ago I wrote a php script that used URL encoding with jbrowse1 in > my previous lab. However, I'm wondering if there is a better solution for > JBrowse2. > > Thank you, > -Hans > > -- > > > > [image: signature_998258195] > > *Hans Vasquez-Gross, Ph.D* > > Bioinformatics Scientist, > Nevada Bioinformatics Center > > https://www.unr.edu/bioinformatics > > hva...@un... > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |
From: Hans Vasquez-G. <hva...@un...> - 2023-08-19 06:09:57
|
Hi All, Is there a web package for BLAST that will integrate into JBrowse2? I would like something where a user could submit a target gene of interest, BLAST to a particular database, then open a view with a custom track with where it hits. ~7 years ago I wrote a php script that used URL encoding with jbrowse1 in my previous lab. However, I'm wondering if there is a better solution for JBrowse2. Thank you, -Hans -- [signature_998258195] Hans Vasquez-Gross, Ph.D Bioinformatics Scientist, Nevada Bioinformatics Center https://www.unr.edu/bioinformatics hva...@un...<mailto:hva...@un...> |
From: Colin <col...@gm...> - 2023-07-22 18:41:01
|
Hi Adrienne, To my knowledge, Genbank files are mostly used for representing gene features, so loading the FeatureTrack from the GFF that you converted from Genbank is probably getting most of the value out of the file. If you have links to the genbank data though we could check it out. -Colin On Fri, Jul 21, 2023 at 11:07 AM Adrienne Kwan <adr...@sf...> wrote: > Hi JBrowse team, > > > I am using the @jbrowse/react-linear-genome-view component in a React web > app. All my input files are GenBank. > > > My web app currently uses: > > - *Reference Sequence Track* (by converting Genbank to FASTA) > > - *Feature Track* (by converting GenBank to GFF) > > > What other tracks can I use, if I only have GenBank input files? > > > I am completely new to bioinformatics and come mainly from a computer > science background, so I don't know much about these individual file types > and how they work with JBrowse! > > > I tried creating an *Alignments Track* (by converting GenBank to BAM), > but the `samtools quickcheck` said that the BAM file "had no targets in > header", and the JBrowse alignments track said "Error: problem > decompressing block: incorrect gzip header check". > > > Thanks, > > > Adrienne > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |