From: Colin <col...@gm...> - 2022-06-24 06:13:00
|
We also have considered making it use itemRgb field for coloring by default too, if interested you can check out https://github.com/GMOD/jbrowse-components/issues/1734 -Colin On Fri, Jun 24, 2022 at 12:07 AM Colin <col...@gm...> wrote: > 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 >> > > > |