set color for plugins; but not work #4595
Replies: 1 comment
-
I solved it, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I want to customize the color for each line in bed file.
In my bedfile, I write the color in rgb format like
chr1 121976286 127006099 ASat 0 - 121976286 121976393 137,22,64
chr1 127011030 127020646 HSat2 0 - 127011030 127020646 50,51,102
chr1 127022782 127028628 HSat2 0 + 127022782 127028628 50,51,102
chr1 127090668 128516244 HSat2 0 + 127090668 128516244 50,51,102
Since I have a color callback that has a lot of logic in it, I followed the section "Making sophisticated color callbacks#
my plugin look like
then I add track like
jbrowse add-track ~/MF2_mat.round1.merged.cenanno.bb --load copy --out ~/jbrowse2/data --assemblyNames MF2 --config '{"displays": [{"displayId": "sy", "type": "LinearBasicDisplay", "renderer": {"color1": "jexl:colorFeature(feature)" }}]}' --force
it displays all grey blocks,
I tested and looked for all related disscusions
jbrowse add-track ~/MF2_mat.round1.merged.cenanno.bb --load copy --out ~/jbrowse2/data --assemblyNames MF2 --config '{"displays": [{"displayId": "sy", "type": "LinearBasicDisplay", "renderer": {"color1": "jexl:get(feature,'field3')=='ASat'?'red':'blue'" }}]}' --force
Then it shows all blue
so I think it seems work with simple logic, however, what's wrong in my 'myplugin.js'?
best
x
Beta Was this translation helpful? Give feedback.
All reactions