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

Questions if distance matrices/count tables come from within R #24

Open
pschloss opened this issue Oct 4, 2024 · 0 comments
Open

Questions if distance matrices/count tables come from within R #24

pschloss opened this issue Oct 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@pschloss
Copy link
Member

pschloss commented Oct 4, 2024

Currently we read in distance matrices and count tables from disk as if they were generated by mothur. But, if they were generated in R, how do we hand off the data to clustur without writing to/reading from disk?

This should be "easy" to do... Could we have a conversion function that converts between an object from stats::dist() or sparseMatrix and our read_dist() object or a data.frame object and our read_count() object? Possible functions convert_dist() / convert_count()

More challenging... Could we pass a memory address between packages? For example, if down the road we create a calc_dist() function that stores the distances as a pointer to a C++ object, can we pass that object to cluster() or do we need to output to a data.frame and then convert that to our pointer? What are the memory/speed considerations here? Are deep copies generated? It would be good to set up a toy package to see if we can create the pointer and pass it to cluster.

@GregJohnsonJr GregJohnsonJr self-assigned this Oct 11, 2024
@GregJohnsonJr GregJohnsonJr added the enhancement New feature or request label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants