Open alanmejiamaza opened 1 year ago
Thanks for your interest in the package. Have you utilized the tutorial? It was included as a vignette with the package.
Hi
Thanks for developing the Primo package. I am reaching out to discuss an issue I encountered while using the conditional analysis function in the Primo package.
Specifically, I have discovered a potential bug when using the "collapse_pp_num()" function for cases where there are only two traits, such as GWAS and eQTL.
Here is the code I attempted to run: PP_grouped <- Primo::collapse_pp_num(Primo_obj$post_prob[gwas_idx,], req_idx = gwas_col, prefix = "pp_nQTL_ge")
Unfortunately, this produced an error message: Error in rowSums(Q[, -req_idx]) : 'x' must be an array of at least two dimensions.
Upon investigating this issue, I believe the error arises due to the dimension of the object passed to the "rowSums()" function. When the number of columns is two and req_idx = 1, the expression Q[, -req_idx] results in an object that is not a matrix, thus causing the "rowSums()" function to fail.
I would be immensely grateful if you could investigate this potential bug. If it is confirmed to be an issue, it would be beneficial for all users if an updated version of the package could be released to address it.
Thanks, TQ
Hi TQ:
Thank you for your interest in the package. Primo was developed for integrative analysis of GWAS summary statistics with multiple sets of omics QTL summary statistics. Thus, your example using one set of omics QTL summary statistics (eQTL) and GWAS (two total traits) is fewer sets of summary statistics than the motivation to develop the method and accompanying package.
For your example, the function Primo::collapse_pp_num() sums over posterior probabilities of association patterns matching the criterion of "at least n" traits coming from the alternative distribution to provide the posterior probability of being associated with "at least n" traits. If requiring the GWAS trait to have a non-null association in a two trait setting ('req_idx'), then the posterior probability of being associated with the other trait (and GWAS) should simply be the last association pattern (i.e. associated with "all" traits). This should be directly provided by the matrix of posterior probabilities from the original primo object.
Best, Kevin
Hi,
First time using your package. I'm wondering if you have a manual for running conditional analysis. Thanks