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

Join on sq type fails #100

Open
DSLituiev opened this issue Dec 10, 2024 · 1 comment
Open

Join on sq type fails #100

DSLituiev opened this issue Dec 10, 2024 · 1 comment

Comments

@DSLituiev
Copy link

DSLituiev commented Dec 10, 2024

Describe the bug
Join on sq type fails. I am trying to join two tables on sq column.

To Reproduce

tibble(sq=sq(c("CTGAATGCAGT", "ATGCCGT", "CAGACCATT"))) %>% inner_join(.,.)

->

Joining with `by = join_by(sq)`
Error: Unsupported type raw

Desktop :

  • OS: MacOS 14.7.1 (23H222)
  • R version 4.3.1 (2023-06-16)
@ErdaradunGaztea
Copy link
Member

Hi, I remember trying to do the same (or maybe it was group_by()?) around the time we were developing {tidysq} - and it didn't work then either. Unfortunately, we've never figured out how to make {tibble} and related packages perform many such operations on raw vectors. Not sure if it's even possible without modifying {tibble} itself.

In retrospect, we could have decided to store sq objects as characters or integers instead of raw vectors, since the exact representation on R side is pretty much irrelevant - almost everything* happens in C++ anyways. Perhaps we were worried about extra storage overhead for characters/integers, perhaps we thought that raw vectors fit the intent the most.

As for the solution, I don't think we'll be able to make it work with {tidysq}; unfortunately, I can only reccomend casting these sequences to characters, which nullifies the key selling point of {tidysq}.

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

No branches or pull requests

2 participants