sehilyi / gemini-archived

Visualization grammar for genomic data
0 stars 0 forks source link

Spec preprocessing: deep to long #37

Closed sehilyi closed 4 years ago

sehilyi commented 4 years ago

Consider the following spec conversion before rendering for the simplicity.

From:

        {
            "description": "gene right",
            "select": [
                { "channel": "geneOrExon", "equal": "gene" },
            ],
            "mark": {
                "bind": "strand",
                "domain": ["+", "-"],
                "range": ["rule", "triangle-r"]
            },
            "size": 12,
            "x": { "bind": "x1" },
        }

To:

        {
            "description": "gene right",
            "select": [
                { "channel": "geneOrExon", "equal": "gene" },
                { "channel": "strand", "equal": "+" },
            ],
            "mark": "rule",
            "size": 12,
            "x": { "bind": "x1" },
        },
        {
            "description": "gene right",
            "select": [
                { "channel": "geneOrExon", "equal": "gene" },
                { "channel": "strand", "equal": "-" },
            ],
            "mark": "triangle-r",
            "size": 12,
            "x": { "bind": "x1" },
        }