From: Chen X. <xi...@ev...> - 2022-06-21 04:45:07
|
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 |
From: Colin <col...@gm...> - 2022-06-21 18:02:22
|
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 > |
From: Colin <col...@gm...> - 2022-06-21 23:39:59
|
Small correction, you can actually specify the color callback for LinearArcDisplay in the config.json in current versions, but it just isn't visible as a callback in the UI Will be fixed in next version now -Colin On Tue, Jun 21, 2022 at 12:02 PM Colin <col...@gm...> wrote: > 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 >> > |
From: Scott C. <sc...@sc...> - 2022-06-22 17:35:19
|
About the interchromosomal interactions: it would be really cool if the circular view could be adapted to display those! On Tue, Jun 21, 2022 at 4:40 PM Colin <col...@gm...> wrote: > Small correction, you can actually specify the color callback for > LinearArcDisplay in the config.json in current versions, but it just isn't > visible as a callback in the UI > > Will be fixed in next version now > > -Colin > > On Tue, Jun 21, 2022 at 12:02 PM Colin <col...@gm...> wrote: > >> 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 >>> >> _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > -- ------------------------------------------------------------------------ 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: Chen X. <xi...@ev...> - 2022-06-24 05:02:02
Attachments:
coloring_problem.png
|
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 > |
From: Colin <col...@gm...> - 2022-06-24 06:07:54
|
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 > > |
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 >> > > > |
From: Chen X. <xi...@ev...> - 2022-06-24 08:03:09
|
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 > > |
From: Chen X. <xi...@ev...> - 2022-08-02 01:24:04
|
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 > > |
From: Colin <col...@gm...> - 2022-08-02 11:10:55
|
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 > > > > |
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 > > > > |
From: Garrett S. <ste...@gm...> - 2022-08-04 00:33:55
|
I might be able to help with this. The format of the arc renderer is different, so you'd have to have something like this for that display: { "type": "LinearArcDisplay", "displayId": "K562_bulk_co_sites_arc_color", "renderer": { "type": "ArcRenderer", "color": "jexl:get(parent(feature), 'itemRgb')" } } Note the different renderer type and "color" instead of "color1". Hope that helps, Garrett On Tue, Aug 2, 2022 at 11:01 PM Chen Xie <xi...@ev...> wrote: > 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 > > > > > > > > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |
From: Chen X. <xi...@ev...> - 2022-08-04 02:54:57
|
Hi Garrett, Thank you very much for your help! The problem is solved, but a bit different. For ArcRenderer, "color": "jexl:get(feature, 'itemRgb')" works, but "color": "jexl:get(parent(feature), 'itemRgb')" gives errors: "TypeError: e is undefined" for Firefox, and "TypeError: Cannot read properties of undefined (reading 'get')" for Chrome. However, for SvgFeatureRenderer (in the case of LinearBasicDisplay), "color1": "jexl:get(parent(feature), 'itemRgb')" works. Do you know the reason? Best wishes, Chen ----- 原始邮件 ----- 发件人: "Garrett Stevens" <ste...@gm...> 收件人: "Chen Xie" <xi...@ev...> 抄送: "gmod-ajax" <gmo...@li...> 发送时间: 星期四, 2022年 8 月 04日 上午 8:33:36 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks I might be able to help with this. The format of the arc renderer is different, so you'd have to have something like this for that display: { "type": "LinearArcDisplay", "displayId": "K562_bulk_co_sites_arc_color", "renderer": { "type": "ArcRenderer", "color": "jexl:get(parent(feature), 'itemRgb')" } } Note the different renderer type and "color" instead of "color1". Hope that helps, Garrett On Tue, Aug 2, 2022 at 11:01 PM Chen Xie <xi...@ev...> wrote: > 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 > > > > > > > > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |
From: Garrett S. <ste...@gm...> - 2022-08-04 21:51:14
|
Hi Chen, I think it has to do with what you are coloring. In the ArcRenderer, the arc is based on the top-level parent feature (e.g. a gene) where in the SvgFeatureRenderer you are coloring a child feature (e.g. an mRNA), so you have to retrieve the parent feature that has the itemRgb first. Best, Garrett On Wed, Aug 3, 2022 at 8:54 PM Chen Xie <xi...@ev...> wrote: > Hi Garrett, > > Thank you very much for your help! The problem is solved, but a bit > different. > > For ArcRenderer, "color": "jexl:get(feature, 'itemRgb')" works, but > "color": "jexl:get(parent(feature), 'itemRgb')" gives errors: "TypeError: e > is undefined" for Firefox, and "TypeError: Cannot read properties of > undefined (reading 'get')" for Chrome. However, for SvgFeatureRenderer (in > the case of LinearBasicDisplay), "color1": "jexl:get(parent(feature), > 'itemRgb')" works. Do you know the reason? > > Best wishes, > Chen > > > > > ----- 原始邮件 ----- > 发件人: "Garrett Stevens" <ste...@gm...> > 收件人: "Chen Xie" <xi...@ev...> > 抄送: "gmod-ajax" <gmo...@li...> > 发送时间: 星期四, 2022年 8 月 04日 上午 8:33:36 > 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks > > I might be able to help with this. The format of the arc renderer is > different, so you'd have to have something like this for that display: > > { > "type": "LinearArcDisplay", > "displayId": "K562_bulk_co_sites_arc_color", > "renderer": { > "type": "ArcRenderer", > "color": "jexl:get(parent(feature), 'itemRgb')" > } > } > > Note the different renderer type and "color" instead of "color1". > > Hope that helps, > Garrett > > On Tue, Aug 2, 2022 at 11:01 PM Chen Xie <xi...@ev...> wrote: > > > 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 > > > > > > > > > > > > > > _______________________________________________ > > Gmod-ajax mailing list > > Gmo...@li... > > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > > > |
From: Chen X. <xi...@ev...> - 2022-08-05 02:34:50
|
Hi Garrett, Thanks for your explanation! Best wishes, Chen ----- 原始邮件 ----- 发件人: "Garrett Stevens" <ste...@gm...> 收件人: "Chen Xie" <xi...@ev...> 抄送: "gmod-ajax" <gmo...@li...> 发送时间: 星期五, 2022年 8 月 05日 上午 5:50:51 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks Hi Chen, I think it has to do with what you are coloring. In the ArcRenderer, the arc is based on the top-level parent feature (e.g. a gene) where in the SvgFeatureRenderer you are coloring a child feature (e.g. an mRNA), so you have to retrieve the parent feature that has the itemRgb first. Best, Garrett On Wed, Aug 3, 2022 at 8:54 PM Chen Xie <xi...@ev...> wrote: > Hi Garrett, > > Thank you very much for your help! The problem is solved, but a bit > different. > > For ArcRenderer, "color": "jexl:get(feature, 'itemRgb')" works, but > "color": "jexl:get(parent(feature), 'itemRgb')" gives errors: "TypeError: e > is undefined" for Firefox, and "TypeError: Cannot read properties of > undefined (reading 'get')" for Chrome. However, for SvgFeatureRenderer (in > the case of LinearBasicDisplay), "color1": "jexl:get(parent(feature), > 'itemRgb')" works. Do you know the reason? > > Best wishes, > Chen > > > > > ----- 原始邮件 ----- > 发件人: "Garrett Stevens" <ste...@gm...> > 收件人: "Chen Xie" <xi...@ev...> > 抄送: "gmod-ajax" <gmo...@li...> > 发送时间: 星期四, 2022年 8 月 04日 上午 8:33:36 > 主题: Re: [Gmod-ajax] About coloring tabix-indexed BED or bigBed tracks > > I might be able to help with this. The format of the arc renderer is > different, so you'd have to have something like this for that display: > > { > "type": "LinearArcDisplay", > "displayId": "K562_bulk_co_sites_arc_color", > "renderer": { > "type": "ArcRenderer", > "color": "jexl:get(parent(feature), 'itemRgb')" > } > } > > Note the different renderer type and "color" instead of "color1". > > Hope that helps, > Garrett > > On Tue, Aug 2, 2022 at 11:01 PM Chen Xie <xi...@ev...> wrote: > > > 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 > > > > > > > > > > > > > > _______________________________________________ > > Gmod-ajax mailing list > > Gmo...@li... > > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > > > |