Skip to content

Commit

Permalink
adding back the CeNDR track custom coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcain committed Jul 5, 2023
1 parent 4e60864 commit 88fd8d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10867,7 +10867,11 @@
"displays" : [
{
"type" : "LinearVariantDisplay",
"displayId" : "cendr_variation-c_elegans_PRJNA13758-LinearVariantDisplay"
"displayId" : "cendr_variation-c_elegans_PRJNA13758-LinearVariantDisplay",
"renderer": {
"type": "SvgFeatureRenderer",
"color1": "jexl:variantColor(feature)"
}
}
],
"description" : "Strain variant data from https://www.elegansvariation.org/. For more information see Cook DE, Zdraljevic S, Roberts JP, Andersen EC. CeNDR, the Caenorhabditis elegans natural diversity resource. Nucleic Acids Res. 2017 Jan 4;45(D1):D650-D657. doi: 10.1093/nar/gkw893. Epub 2016 Oct 3. PubMed PMID: 27701074; PubMed Central PMCID: PMC5210618. Colors follow the same scheme as ENSEMBL for predicted variants (https://uswest.ensembl.org/info/genome/variation/prediction/predicted_data.html), and variants with no predicted impact are black and variants that don't have recognized predicted consequence are peachpuff (a pale pink-orange). Variants with more than one predicted consequences are colored by the first annotation.",
Expand Down
2 changes: 1 addition & 1 deletion variantColor_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

install(pluginManager) {
pluginManager.jexl.addFunction('variantColor', f => {
if (f['variant']['INFO']['ANN']) {
if ('variant' in f && 'INFO' in f['variant'] && 'ANN' in f['variant']['INFO']) {
var ann = f['variant']['INFO']['ANN'][0].split('|')
var cons = ann[1]
if (cons.indexOf('&') > -1) {
Expand Down

0 comments on commit 88fd8d3

Please sign in to comment.