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

Data join between 3D model (coord system) and values #1118

Open
sehilyi opened this issue Mar 3, 2025 · 0 comments
Open

Data join between 3D model (coord system) and values #1118

sehilyi opened this issue Mar 3, 2025 · 0 comments
Labels
spatial Issues related to 3D genomics data visualization v2 Issues related to Gosling v2

Comments

@sehilyi
Copy link
Member

sehilyi commented Mar 3, 2025

(still actively updating notes here...)

Goal

  • We want to enable users to provide a 3D model (the 3D coordinate system) in addition to their data.
  • We need to find a way that harmonizes with the current Goslign grammar (i.e., it shouldn't change the existing grammar significantly).
  • We want to find a way that is general enough so that the other layout option (i.e., space-filling layout) can be applied with the same approach.

Example Datasets (Simplest)

Model

x y z chr coord
20.713 -14.117 -5.7 chr f 3000000
20.536 -13.494 -4.919 chr f 3100000
20.381 -13.234 -3.995 chr f 3200000

Values

chr position value
chr f 3000000 0.1
chr f 3100000 10.4
chr f 3200000 15.2

Grammar

Option 1 (join data transform)

{
  views: [{
    layout: 'spatial',
    tracks: [
      { data: { type: 'csv', url: '...' }, // track 1
        spatial: {
          x: "x",
          y: "y",
          z: "z",
          chr: "chr",
          coord: "coord"
        },
        dataTransform: [{
          type: 'join', url: 'https://raw.githubusercontent.com/dvdkouril/chromospace-sample-data/main/gosling-3d/yeast_model.csv', ...
        }],
      }
      { ... }, // track 2
    ]
  }]
}

Option 2 (view-level 3D model definition)

{
  views: [{
    layout: {
      type: 'spatial',
      model: {
        type: 'csv',
        url: 'https://raw.githubusercontent.com/dvdkouril/chromospace-sample-data/main/gosling-3d/yeast_model.csv',
        x: "x",
        y: "y",
        z: "z",
        chr: "chr",
        coord: "coord"
      },
      tracks: [
        { data: { type: 'csv', url: '...' }, ... }, // track 1
        { data: { type: 'csv', url: '...' }, ... }, // track 2
      ]
    }
}]}

Challenges

  • The potential mismatch in terms of bin sizes and positions between the 3D model and values (e.g., 2kbp in the 3D model vs. 3kbp in values).

Example 3D model dataset:

@sehilyi sehilyi added v2 Issues related to Gosling v2 spatial Issues related to 3D genomics data visualization labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spatial Issues related to 3D genomics data visualization v2 Issues related to Gosling v2
Projects
None yet
Development

No branches or pull requests

1 participant