Skip to content

feat: Return chromsizes tileset info#158

Merged
pkerpedjiev merged 7 commits intodevelopfrom
kerpedji/chromsizes-tileset-info
Apr 7, 2025
Merged

feat: Return chromsizes tileset info#158
pkerpedjiev merged 7 commits intodevelopfrom
kerpedji/chromsizes-tileset-info

Conversation

@pkerpedjiev
Copy link
Member

Description

What was changed in this pull request?

  • Adds a tileset_info function for chromsizes objects

Why is it necessary?

  • Allows us to phase out loading chromosome sizes from bespoke /chrom-info paths in higlass-server

Fixes #___

Checklist

  • Unit tests added or updated
  • Updated CHANGELOG.md
  • Run black .

@pkerpedjiev pkerpedjiev changed the title feat: Return chromsizes tilest info feat: Return chromsizes tileset info Apr 6, 2025
from pydantic import BaseModel


class TilesetInfo(BaseModel):
Copy link
Member

Choose a reason for hiding this comment

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

I see this is only used in the test. Should that be in the test module only or is this intended as a part of the public API?

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.

Looks good. Just a couple of clarifying comments.


assert tsinfo.max_width > 100
assert len(tsinfo.chromsizes) > 2
# TODO: Do something with the return value
Copy link
Member

Choose a reason for hiding this comment

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

The parsing with the pydantic model is a kind of assertion here, is that what you were thinking wrt to "return value'?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I meant to remove that line. Removing in the next commit.

@pkerpedjiev pkerpedjiev merged commit 1c094c7 into develop Apr 7, 2025
3 checks passed
@pkerpedjiev pkerpedjiev deleted the kerpedji/chromsizes-tileset-info branch April 7, 2025 03:38
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.

2 participants