add ucos conversion to robust colocalization filtering #112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates
get_robust_colocalizationto properly convert filtered-out outcomes and single-trait CoS to UCoS using the original UCoS criterion. Qualified UCoS candidates are now merged directly intoucos_detailsinstead of being stored separately inucos_from_cos, so they are compatible with plotting and other functions.Changes
cos_cs_changeandcheck_null_max_ucosto the colocboost output object inget_cos_detailsto enable UCoS filtering without requiring the original model objectcs_change >= check_null_max_ucos) are merged into an updateducos_details.Rationale
Having a way to narrow to a set of robust colocalization events is useful for downstream analysis. If we discard the weak colocalization between a strong signal and a weak signal, we still want to retaining the strong signal as a UCoS. The previous approach did not allow for UCoS selection with the
cs_change >= check_null_max_ucosapproach that is originally used, and so pre and post robust UCoS were not directly comparable. By preservingcs_changeinformation in the colocboost summary, we can calculate UCoS post robust filtering.New UCoS candidates come from three sources:
npc_outcome_cutofffilteringnpc_outcome_cutofffilteringcos_npc_cutofffilteringTesting
All changes maintain backward compatibility. The output structure is the same as before, with new UCoS consolidated in
ucos_details