-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
==========================================
- Coverage 93.21% 92.24% -0.97%
==========================================
Files 7 7
Lines 869 929 +60
==========================================
+ Hits 810 857 +47
- Misses 59 72 +13
|
@pytest.mark.parametrize( | ||
"setup_kwargs, de_kwargs", | ||
[ | ||
( | ||
{"sample_key": "sample", "batch_key": "batch"}, | ||
[ | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"add_batch_specific_offsets": True, | ||
}, | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"lambd": 1e-1, | ||
"add_batch_specific_offsets": True, | ||
}, | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"filter_inadmissible_samples": True, | ||
"add_batch_specific_offsets": True, | ||
}, | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"add_batch_specific_offsets": False, | ||
}, | ||
], | ||
), | ||
( | ||
{ | ||
"sample_key": "sample", | ||
"batch_key": "batch", | ||
"continuous_covariate_keys": ["cont_cov"], | ||
}, | ||
[ | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"add_batch_specific_offsets": False, | ||
} | ||
], | ||
), | ||
( | ||
{"sample_key": "sample", "batch_key": "dummy_batch"}, | ||
[ | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
}, | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"lambd": 1e-1, | ||
}, | ||
{ | ||
"sample_cov_keys": ["meta1_cat", "meta2", "cont_cov"], | ||
"store_lfc": True, | ||
"filter_inadmissible_samples": True, | ||
}, | ||
], | ||
), | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is lowkey kind of hard to parse, is there a way to simplify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok nvm I see what it's doing now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea..it's because its replicating the old behavior, which was not neatly combinatorial way, but I did not want to significantly change what was being tested. We can refactor it again if needed and it will be easier this time with parametrize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I have some comments on differential_abudance, where I feel we could also return log enrichment scores and be more careful regarding continuous covarariates.
This PR prepares the DE and DA functions for public use:
perform_multivariate_analysis
todifferential_expression
donor
tosample
in many placesdifferential_abundance
method that wraps theget_aggregated_posterior
method and uses a similar API todifferential_expression
test_models.py
to use pytest parameterize, and adds tests for DA.Addresses #94 #95