gosling.js
gosling.js copied to clipboard
Pileup transformation with non-higlass data throws an error
It looks like the source of the error is when combining tiles before applying the pileup transformation.
Source of the error (code):
// combineAllTilesIfNeeded()
tiles.forEach((t: any, i: number) => {
// Combine data
newData = [...newData, ...t.tileData]; // Uncaught (in promise) TypeError: c.tileData is not iterable
// Flag to force using only one tile
t.mergedToAnotherTile = i !== 0;
});
tileData
is only available for the higlass data.
Minimal example:
{
"tracks": [
{
"data": {
"type": "json",
"values": [
{"c": "chr1", "s": 100, "e": 200},
{"c": "chr5", "s": 150, "e": 200}
],
"chromosomeField": "c",
"genomicFields": ["s", "e"]
},
"dataTransform": [
{
"type": "displace",
"method": "pile",
"boundingBox": {"startField": "s", "endField": "e"},
"newField": "row"
}
],
"mark": "rect",
"x": {"field": "s", "type": "genomic", "domain": {"interval": [1, 300]}},
"xe": {"field": "e", "type": "genomic"},
"color": {"value": "red"},
"stroke": {"value": "black"},
"strokeWidth": {"value": 1}
}
]
}