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

feat: enable using custom assembly by specifying chrom sizes #776

Merged
merged 2 commits into from Jul 24, 2022

Conversation

sehilyi
Copy link
Member

@sehilyi sehilyi commented Jul 22, 2022

Fix #582

Change List

This PR enables users to use custom assembly by specifying pairs of a chromosome name and its size:

editor demo (localhost)

{
  "assembly": [["foo", 1000], ["bar", 900], ["baz", 800]],
  "tracks": [
    {
      "data": {
        "type": "json",
        "values": [
          {"c": "foo", "g": 500, "v": 1},
          {"c": "bar", "g": 450, "v": 2},
          {"c": "baz", "g": 400, "v": 3}
        ],
        "chromosomeField": "c",
        "genomicFields": ["g"]
      },
      "mark": "point",
      "color": {"value": "#0072B2"},
      "stroke": {"value": "white"},
      "strokeWidth": {"value": 2},
      "x": {"field": "g", "type": "genomic"},
      "width": 800,
      "height": 30
    }
  ]
}

Screen Shot 2022-07-22 at 15 30 54

bigwig example
{
  "assembly": [["NC_000962.3", 4411532]],
  "data": {
    "url": "[your-bigwig-file.bw]",
    "type": "bigwig"
  },
  "mark": "bar",
  "x": {"field": "start", "type": "genomic", "axis": "top"},
  "xe": {"field": "end", "type": "genomic"},
  "y": {"field": "value", "type": "quantitative"},
  "width": 600,
  "height": 130
}

Screen Shot 2022-07-22 at 14 35 39

Checklist

  • Ensure the PR works with all demos on the online editor
  • Unit tests added or updated
  • Examples added or updated
  • Documentation updated (e.g., added API functions)
  • Screenshots for visual changes (e.g., new encoding support or UI change on Editor)

src/core/utils/assembly.ts Outdated Show resolved Hide resolved
Copy link
Member

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this looks great! Thanks for the quick implementation. Excited to land this feature for our users.

src/core/utils/assembly.ts Outdated Show resolved Hide resolved
@sehilyi sehilyi merged commit b08334a into master Jul 24, 2022
@sehilyi sehilyi deleted the sehilyi/custom-assembly branch July 24, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom chromsizes
2 participants