Skip to content

Commit ad7a6e4

Browse files
committed
Only support specific properties from the Jbrowse track JSON
1 parent 3686e42 commit ad7a6e4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

jbrowse/src/org/labkey/jbrowse/model/JsonFile.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,22 @@ else if (TRACK_TYPES.bed.getFileType().isType(targetFile.getFile()))
317317

318318
ret = possiblyAddSearchConfig(ret, rg);
319319

320-
//TODO: validate/document additional properties.
320+
//Note: currently only support limited properties since a blind merge would make it easy to break the UI
321321
if (getTrackJson() != null)
322322
{
323323
JSONObject json = getExtraTrackConfig();
324+
if (json.containsKey("metadata"))
325+
{
326+
ret.put("metadata", json.getJSONObject("metadata"));
327+
}
328+
329+
if (json.containsKey("category"))
330+
{
331+
ret.put("category", new JSONArray(){{
332+
put(json.getString("category"));
333+
}});
334+
}
335+
324336
ret.putAll(json);
325337
}
326338

@@ -519,6 +531,12 @@ private JSONObject getVcfTrack(Logger log, ExpData targetFile, ReferenceGenome r
519531
put("type", "ExtendedVariantRenderer");
520532
put("showLabels", false);
521533
}});
534+
535+
JSONObject json = getExtraTrackConfig();
536+
if (json != null && json.containsKey("additionalFeatureMsg"))
537+
{
538+
getJSONObject("renderer").put("message", json.getString("message"));
539+
}
522540
}});
523541
}});
524542

0 commit comments

Comments
 (0)