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

GWIS configuration #201

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

GWIS configuration #201

wants to merge 3 commits into from

Conversation

joshua-slaughter
Copy link
Contributor

Hi all, I have put together a configuration for estimating pairwise interactions at the genome-wide scale. The changes to make this possible only required minimal changes to inputs_from_config.jl. A review would be very appreciated!

@olivierlabayle
Copy link
Member

Thank you Josh, I'll have a look asap!

Copy link
Member

@olivierlabayle olivierlabayle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Josh, see my comments in the review, happy to discuss.

treatments = treatments_from_variant(variant, dataset)

if isempty(extra_treatments)
treatments = treatments_from_variant(variant, dataset)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle you could do a GWAS with 2,3,... treatments, i.e. ATEs with (variant, environmental variable) even if this is not supported yet.

Also I think this function's name is a bit ambiguous so maybe we could take the opportunity to clarify it. Something like genome_wide_estimands ? But I'm open to suggestions.


if isempty(extra_treatments)
treatments = treatments_from_variant(variant, dataset)
elseif length(extra_treatments) == 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why limiting the scope? It is probably not too hard to include any order no?

@@ -187,6 +198,24 @@ function estimands_from_gwas(dataset, variants, outcomes, confounders;
return vcat(estimands_partitions...)
end

function estimands_from_gwis(dataset, variants, outcomes, confounders;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I first read your PR with GWIS, I thought it would be whole-genome against whole genome interactions. I would personally call this mode genome wide environment interaction study, i.e. change all GWIS to GWEIS.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file has no obvious difference with the GWAS mode, however I would expect the generated estimands to be quite different. Also, you can reuse a test function like get_summary_stats instead of redefining it it is exactly the same by including it in the testutils.jl file.

elseif length(extra_treatments) == 1
treatments = Dict(treatments_from_variant(variant, dataset)..., treatments_from_variant(string(extra_treatments[1]), dataset)...)
else
error("GWIS mode only supports pairwise interaction with one extra treatment.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if someone tries to do a GWAS with extra treatment this error message will be misleading.

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

Successfully merging this pull request may close these issues.

2 participants