Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_dict -> to_widget Removes Parts of the View Config #63

Closed
ilan-gold opened this issue May 28, 2021 · 0 comments · Fixed by #115
Closed

to_dict -> to_widget Removes Parts of the View Config #63

ilan-gold opened this issue May 28, 2021 · 0 comments · Fixed by #115
Labels
bug Something isn't working

Comments

@ilan-gold
Copy link
Collaborator

For example

{
  "version": "1.0.0",
  "name": "277152f17b5a2f308820ab4d85c5a426",
  "description": "",
  "datasets": [
    {
      "uid": "A",
      "name": "277152f17b5a2f308820ab4d85c5a426",
      "files": [
        {
          "type": "cells",
          "fileType": "anndata-cells.zarr",
          "url": "https://assets.hubmapconsortium.org/277152f17b5a2f308820ab4d85c5a426/hubmap_ui/anndata-zarr/secondary_analysis.zarr",
          "options": {
            "mappings": {
              "UMAP": {
                "key": "obsm/X_umap",
                "dims": [
                  0,
                  1
                ]
              }
            },
            "factors": [
              "obs/marker_gene_0",
              "obs/marker_gene_1",
              "obs/marker_gene_2",
              "obs/marker_gene_3",
              "obs/marker_gene_4"
            ]
          }
        },
        {
          "type": "cell-sets",
          "fileType": "anndata-cell-sets.zarr",
          "url": "https://assets.hubmapconsortium.org/277152f17b5a2f308820ab4d85c5a426/hubmap_ui/anndata-zarr/secondary_analysis.zarr",
          "options": [
            {
              "groupName": "Leiden",
              "setName": "obs/leiden"
            }
          ]
        },
        {
          "type": "expression-matrix",
          "fileType": "anndata-expression-matrix.zarr",
          "url": "https://assets.hubmapconsortium.org/277152f17b5a2f308820ab4d85c5a426/hubmap_ui/anndata-zarr/secondary_analysis.zarr",
          "options": {
            "matrix": "X",
            "matrixGeneFilter": "var/marker_genes_for_heatmap"
          }
        }
      ]
    }
  ],
  "coordinationSpace": {
    "dataset": {
      "A": "A"
    },
    "embeddingType": {
      "A": "UMAP"
    }
  },
  "layout": [
    {
      "component": "scatterplot",
      "coordinationScopes": {
        "dataset": "A",
        "embeddingType": "A"
      },
      "x": 0,
      "y": 0,
      "w": 4,
      "h": 6
    },
    {
      "component": "cellSetExpression",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 4,
      "y": 0,
      "w": 5,
      "h": 6
    },
    {
      "component": "cellSets",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 9,
      "y": 0,
      "w": 3,
      "h": 3
    },
    {
      "component": "genes",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 9,
      "y": 4,
      "w": 3,
      "h": 3
    },
    {
      "component": "heatmap",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 0,
      "y": 6,
      "w": 12,
      "h": 4
    }
  ],
  "initStrategy": "auto"
}

when fed through to_dict has a resulting Vitessce conf in the widget of

{
  "version": "1.0.1",
  "name": "277152f17b5a2f308820ab4d85c5a426",
  "description": "",
  "datasets": [
    {
      "uid": "A",
      "name": "277152f17b5a2f308820ab4d85c5a426",
      "files": [
        {
          "url": "https://assets.hubmapconsortium.org/277152f17b5a2f308820ab4d85c5a426/hubmap_ui/anndata-zarr/secondary_analysis.zarr",
          "type": "cells",
          "fileType": "anndata-cells.zarr"
        },
        {
          "url": "https://assets.hubmapconsortium.org/277152f17b5a2f308820ab4d85c5a426/hubmap_ui/anndata-zarr/secondary_analysis.zarr",
          "type": "cell-sets",
          "fileType": "anndata-cell-sets.zarr"
        },
        {
          "url": "https://assets.hubmapconsortium.org/277152f17b5a2f308820ab4d85c5a426/hubmap_ui/anndata-zarr/secondary_analysis.zarr",
          "type": "expression-matrix",
          "fileType": "anndata-expression-matrix.zarr"
        }
      ]
    }
  ],
  "coordinationSpace": {
    "dataset": {
      "A": "A"
    },
    "embeddingType": {
      "A": "UMAP"
    }
  },
  "layout": [
    {
      "component": "scatterplot",
      "coordinationScopes": {
        "dataset": "A",
        "embeddingType": "A"
      },
      "x": 0,
      "y": 0,
      "w": 4,
      "h": 6
    },
    {
      "component": "cellSetExpression",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 4,
      "y": 0,
      "w": 5,
      "h": 6
    },
    {
      "component": "cellSets",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 9,
      "y": 0,
      "w": 3,
      "h": 3
    },
    {
      "component": "genes",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 9,
      "y": 4,
      "w": 3,
      "h": 3
    },
    {
      "component": "heatmap",
      "coordinationScopes": {
        "dataset": "A"
      },
      "x": 0,
      "y": 6,
      "w": 12,
      "h": 4
    }
  ],
  "initStrategy": "auto"
}

which is missing all of the options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant