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

chore: add chr prefix to examples #112

Merged
merged 1 commit into from
Aug 25, 2022
Merged

chore: add chr prefix to examples #112

merged 1 commit into from
Aug 25, 2022

Conversation

sehilyi
Copy link
Member

@sehilyi sehilyi commented Aug 22, 2022

Changed chromosome names in the examples to use chr prefix (e.g., 1 --> chr1) since the next version of Gosling will let ones use exact chromosome names (gosling-lang/gosling.js#796).

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 great! Just a thought - I wonder if we should introduce a helper utility for domains as well (similar to gos.value or gos.csv).

@sehilyi
Copy link
Member Author

sehilyi commented Aug 23, 2022

I wonder if we should introduce a helper utility for domains as well (similar to gos.value or gos.csv).

Do you mean something like

gos.GenomicDomain("chr1:2000500-3000500")

instead of

gos.GenomicDomain(chromosome="chr1", interval=[2000500, 3000500])

which I think would be helpful?

@manzt
Copy link
Member

manzt commented Aug 23, 2022

Yeah something like, but the helper function fully lives in Python:

gos.domain("chr1") # returns gos.DomainChr
gos.domain(2000500, 3000500) # returns gos.DomainInterval
gos.domain("chr1", 2000500, 3000500) # returns DomainChrInterval

Maybe we could even expand this somehow implicitly for xDomain in Python without a utility:

view.properties(
	xDomain=("chr1", 2000500, 3000500) # internally expand tuple into gos.GenomicDomain
)

@sehilyi
Copy link
Member Author

sehilyi commented Aug 23, 2022

That would be handy. I think the syntax of the first three seems to be a bit more consistent with what we currently have.

@manzt manzt merged commit 02a873a into main Aug 25, 2022
@manzt manzt deleted the sehilyi/example-chr-prefix branch April 19, 2023 20:52
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