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

Use the genotype matrix for another library #522

Open
garyzhubc opened this issue Nov 19, 2024 · 4 comments
Open

Use the genotype matrix for another library #522

garyzhubc opened this issue Nov 19, 2024 · 4 comments

Comments

@garyzhubc
Copy link

If I want to use the genotype matrix as input to another library, is it something doable? For instance, something like:

library(susieR)
sus <- susie(pcsk9_updown_bigsnp_obj$genotypes,y)

gives

Error in susie(pcsk9_updown_bigsnp_obj$genotypes, y) : 
  Input X must be a double-precision matrix, or a sparse matrix, or a trend filtering matrix
@privefl
Copy link
Owner

privefl commented Nov 20, 2024

Have you looked a bit about the documentation and some of the examples from bigstatsr/bigsnpr?
You should know how to access a standard R matrix from an FBM.

@garyzhubc
Copy link
Author

I know that you can use X[] to retrieve a numerical matrix but then lose the utilities of the bigsnpr matrix.

@garyzhubc
Copy link
Author

But I wonder if there's a way to keep the utility of the bigsnpr matrix

@privefl
Copy link
Owner

privefl commented Nov 20, 2024

I think SuSiE expects a matrix that is not too big anyway.

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