From: Chen X. <xi...@ev...> - 2022-08-03 05:00:40
|
Hi Colin, Thank you very much for your quick reply! Your suggestion works, but not completely. If I do not add color configuration, such as: "displays": [ { "type": "LinearArcDisplay", "displayId": "K562_bulk_co_sites_arc_color" }, { "type": "LinearBasicDisplay", "displayId": "K562_bulk_co_sites_basic_color", "renderer": { "type": "SvgFeatureRenderer", "color1": "jexl:get(parent(feature), 'itemRgb')" } } ], It works. But when I add color configuration, it does not work. For example: "displays": [ { "type": "LinearArcDisplay", "displayId": "K562_bulk_co_sites_arc_color", "renderer": { "type": "SvgFeatureRenderer", "color1": "jexl:get(parent(feature), 'itemRgb')" } }, { "type": "LinearBasicDisplay", "displayId": "K562_bulk_co_sites_basic_color", "renderer": { "type": "SvgFeatureRenderer", "color1": "jexl:get(parent(feature), 'itemRgb')" } } ], I tried with both v1.7.10 and v2.1.0. Could you please help me on this? Thanks again! Best wishes, Chen ----- 原始邮件 ----- 发件人: "Colin" <col...@gm...> 收件人: "Chen Xie" <xi...@ev...> 抄送: "gmod-ajax" <gmo...@li...> 发送时间: 星期二, 2022年 8 月 02日 下午 7:10:33 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks Hi there, there was a bug in the v2.0.0 release that caused this issue, we will have it fixed in the next release https://github.com/GMOD/jbrowse-components/pull/3120 To hardcode a displaytype as the default, it can be listed as first in the "displays" array in the config, example: { "type": "FeatureTrack", "trackId": "gff3tabix_genes", "name": "GFF3Tabix genes", "assemblyNames": [ "volvox" ], "adapter": { "type": "Gff3TabixAdapter", "gffGzLocation": { "uri": "volvox.sort.gff3.gz" }, "index": { "location": { "uri": "volvox.sort.gff3.gz.tbi" } } }, "displays": [ { "type": "LinearArcDisplay", "displayId": "gff3tabix_genes-LinearArcDisplay" }, { "type": "LinearBasicDisplay", "displayId": "gff3tabix_genes-LinearBasicDisplay" } ] } -Colin On Mon, Aug 1, 2022 at 9:05 PM Chen Xie <xi...@ev...> wrote: > Hi Colin, > > Thank you for helping us on coloring tabix-indexed BED tracks. Here is a > related question. The JBrowse version we set up before was 1.7.10, and now > I notice that the lastest version is 2.1.0. However, when I upgraded our > JBrowse to 2.1.0, LinearArcDisplay did not work anymore, i.e., nothing > happened when I clicked "LinearArcDisplay". The reason that I would like to > upgrade and try LinearArcDisplay for tabix-indexed BED tracks is as you > mentioned, coloring tracks in LinearArcDisplay might be possible in the > newer versions. Thus, could you please also show me how to config this in > the "config.json" file? Thanks again! > > Best wishes, > Chen > > > > > ----- 原始邮件 ----- > 发件人: "Chen Xie" <xi...@ev...> > 收件人: "Colin" <col...@gm...> > 抄送: "gmod-ajax" <gmo...@li...> > 发送时间: 星期五, 2022年 6 月 24日 下午 4:02:57 > 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks > > Hi Colin, > > It works! Thank you very much, and look forward to your updates on > LinearArcDisplay and bigInteract in future. > > Best wishes, > Chen > > > > > ----- 原始邮件 ----- > 发件人: "Colin" <col...@gm...> > 收件人: "Chen Xie" <xi...@ev...> > 抄送: "gmod-ajax" <gmo...@li...> > 发送时间: 星期五, 2022年 6 月 24日 下午 2:07:36 > 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks > > If I am reading the screenshot correctly, this is helpful to see. > > The reason for the issue you are seeing is because jbrowse "synthesizes > child features" from the bigBed feature, and so you would actually want to > access the parent feature's itemRgb field. > > Here is an example > > get(parent(feature),'itemRgb') > > This get's the parent feature's itemRgv field. Another helpful thing for > debugging you can try is > > get(parent(log(feature)),'itemRgb') > > This is exactly the same as above, but it console.log's the feature so you > can inspect it in the chrome devtools :) > > Potentially we could transfer the parent feature data fields onto the child > feature to help with this case, or make a utility function that > automatically looks at current and parent feature or something like that. > Hope that helps though! > > > -Colin > > On Thu, Jun 23, 2022 at 11:01 PM Chen Xie <xi...@ev...> wrote: > > > Hi Colin, > > > > Thank you very much for your nice reply! But after trying a lot in the > > past days, I still have the same problem. As the example you can see in > the > > attached picture, everything is blue including the ones should be red. > The > > collumn name must be correct because I also tested with mouse over (see > the > > red rectangels). Could you please help me to figure out the reason? > Thanks > > again! > > > > Best wishes, > > Chen > > > > > > > > > > ----- 原始邮件 ----- > > 发件人: "Colin" <col...@gm...> > > 收件人: "Chen Xie" <xi...@ev...> > > 抄送: "gmod-ajax" <gmo...@li...> > > 发送时间: 星期三, 2022年 6 月 22日 上午 2:02:04 > > 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks > > > > Hi Chen > > Great questions > > > > For the color callback, I think you have the right idea. The "field8" > would > > be an autoassigned name if the columns of your bed file do not have > names. > > If you have bigBed, you may have column names (they are often provided by > > an autoSql file). You can check the column names using bigBedInfo or the > > "About track" inside jbrowse 2. Then just swap out field8 for whatever > the > > column name is. Let me know if this still has issues > > > > For the other questions > > > > 1) Looks like currently LinearArcDisplay does not have a color callback, > we > > will add this! > > 2) I think bigInteract would be a great thing to try to make an example > of > > for our docs. I think if you wanted to, you could load a bigInteract > bigBed > > file, and use LinearArcDisplay, and it would generally work. The features > > of bigInteract that would be missing are the "feet" (e.g. the lines at > > each end of arc here > > https://genome.ucsc.edu/images/interactUnderstanding2.png) would be > > missing, and the interchromosomal indicators would not display > > > > -Colin > > > > > > > > > > On Tue, Jun 21, 2022 at 12:52 AM Chen Xie <xi...@ev...> wrote: > > > > > Dear Madam/Sir, > > > > > > We have installed your JBrowse 2 on our server to visualize our > > sequencing > > > data. Currently, we met a problem about coloring tabix-indexed BED or > > > bigBed tracks. We put RGB values at the 9th column, and tried by > > following " > > > https://github.com/GMOD/jbrowse-components/discussions/2561" and " > > > https://github.com/GMOD/jbrowse-components/discussions/2772", but it > did > > > not work. Our configuration in "config.json" is similar to (we tested > > with > > > many small changes): > > > > > > "displays": [ > > > { > > > "type": "LinearBasicDisplay", > > > "displayId": "color_test", > > > "renderer": { > > > "type": "SvgFeatureRenderer", > > > "color1": "jexl:get(feature, > > 'field8')=='255,0,0'?'red':'blue'" > > > } > > > } > > > ], > > > > > > With the codes above, it always shows blue color, even when the itemRgb > > > column is '255,0,0', and we also tried with 'field9', but it did not > work > > > either. I guess that we did not put the correct name of the feature > > there. > > > Could you please help us on it? > > > > > > Here are two further quesions: > > > > > > 1. It is great to have this "LinearArcDisplay" in JBrowse 2, can we > also > > > color lines in this type of display? > > > > > > 2. We would like to visualize data in the format of UCSC interact (" > > > https://genome.ucsc.edu/goldenPath/help/interact.html"), which is > > > actually similar to your LinearArcDisplay. Do you plan to support it? > > > > > > Thank you very much and look forward to your reply! > > > > > > Best wishes, > > > Chen Xie > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Gmod-ajax mailing list > > > Gmo...@li... > > > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > > > > |