Skip to content

Commit

Permalink
update syntax for interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlabayle committed Jan 12, 2024
1 parent e186879 commit 21da08c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/tmle_inputs/allele_independent_estimands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function generate_treatments_combinations(treatments_lists, orders)
return sort(treatment_combinations)
end

function generate_interactions!(batch_saver, dataset, variants_config, outcomes, confounders;
function generate_iates!(batch_saver, dataset, variants_config, outcomes, confounders;
extra_treatments=[],
outcome_extra_covariates=[],
positivity_constraint=0.,
Expand Down Expand Up @@ -101,9 +101,9 @@ function allele_independent_estimands(parsed_args)

# Estimands
for estimand_type in config["estimands"]
if estimand_type == "interactions"
if estimand_type == "IATE"
orders = config["orders"]
generate_interactions!(batch_saver, dataset, variants_config, outcomes, confounders;
generate_iates!(batch_saver, dataset, variants_config, outcomes, confounders;
extra_treatments=extra_treatments,
outcome_extra_covariates=outcome_extra_covariates,
positivity_constraint=positivity_constraint,
Expand Down
2 changes: 1 addition & 1 deletion test/data/interaction_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
orders: [2, 3]
estimands:
- interactions
- IATE
variants:
TF1:
bQTLs:
Expand Down
10 changes: 9 additions & 1 deletion test/tmle_inputs/allele_independent_estimands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ include(joinpath(TESTDIR, "tmle_inputs", "test_utils.jl"))
[:RSID_1, :RSID_2],
[:RSID_3, :RSID_4],
[:RSID_5],
]
]
order_1 = TargeneCore.generate_treatments_combinations(treatments_list, [1])
@test order_1 == [
(:RSID_1,),
(:RSID_2,),
(:RSID_3,),
(:RSID_4,),
(:RSID_5,)
]
order_2 = TargeneCore.generate_treatments_combinations(treatments_list, [2])
@test order_2 == [
(:RSID_1, :RSID_3),
Expand Down

0 comments on commit 21da08c

Please sign in to comment.