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 C++ to write faster scan functions #39

Open
fboehm opened this issue Jul 19, 2020 · 3 comments
Open

Use C++ to write faster scan functions #39

fboehm opened this issue Jul 19, 2020 · 3 comments

Comments

@fboehm
Copy link
Owner

fboehm commented Jul 19, 2020

Draw on C++ functions that rqtl/qtl2 uses. Also, for one-QTL, multivariate scan, use Eigen package functions: https://eigen.tuxfamily.org/dox/unsupported/group__KroneckerProduct__Module.html

Note that we need to structure d-variate, d-QTL scan differently because design matrix can't easily be written as a kronecker product of two matrices. However, for d-variate, one-QTL scan, we can write X matrix I_d \otimes genoprobs

@fboehm
Copy link
Owner Author

fboehm commented Jul 19, 2020

qtl2 also has a C++ function for calculating RSS with a three-dimensional genoprobs array: https://github.com/rqtl/qtl2/blob/c915c04b9e3fa848202fe81ebcb91a2c254e62a6/src/linreg.cpp#L45

@fboehm
Copy link
Owner Author

fboehm commented Jul 19, 2020

@fboehm
Copy link
Owner Author

fboehm commented Jul 19, 2020

I would still need to get RSS for a generalized least squares-type problem... or, I can first rotate the X matrix and Y matrix by the matrix sqrt of the inverse Sigma. I would then need to input the appropriately rotated X and Y into a function like that for multivariate regression (linked in previous comment)

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

1 participant