Open shugamoe opened 11 months ago
https://github.com/shugamoe/ctwas/commit/766ed9ca6533d8a5f9314cc78516782198e719cc
This branch/commit is based off of the latest xinhe-lab/ctwas/multigroup
and addresses the by-chromosome functionality (but not the tweak to ld_exprfs
) as well as #7.
I've found it convenient when using cTWAS with sQTL models across multiple tissues (~20k models per tissue) to customize cTWAS to allow for by chromosome
ctwas_rss
parameter estimation/fine-mapping so that I'm not waiting more than 24 hours for a single tissue to finish running on one computer (even with single node parallelization), but instead waiting under that time for 22 chromosomes to finish independently instead.Below is a link to some of the little hacks I made to allow for this functionality before the latest round of updates like pre-harmonization, separate parameter estimation/fine-mapping. (Some small messing around with the
impute_expr_z
output is required as well.) https://github.com/xinhe-lab/ctwas/compare/multigroup...shugamoe:ctwas:multigroup_devI will update this issue with the appropriate branch from my fork when I port these hacks over to the latest
multigroup
updates that have been made, but I think it would be nice forctwas_rss
to be parameterized to allow for at least param. estimation and finemapping by chromosome. I am aware of an example Wesley made to run ctwas for a single region, but I'm not a fan of also having to subset the.db
model as well. Now that parameter estimation and fine-mapping can be separated, it might even make sense to do genome-wide parameter estimation, but by-chromosome fine-mapping/final PIP calculations (with each chromsome on a multicore node).Ideally, it would be nice if when specifying chromosome in
impute_expr_z
(already possible), that the output for this is able to transfer smoothly toctwas_rss
so that a chromosome can be run singly in that function as well. I.e. modifyld_exprfs
fromimpute_expr_z
results if a chromosome is specified, so that it can integrate more smoothly into a chromosome parameterizedctwas_rss
function.