Skip to content

Commit 19fd978

Browse files
committed
Filtering out clusters that aren't associated with the worker guid
1 parent fc6a3df commit 19fd978

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

worker/pipeline_worker.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,12 @@ compile_results <- function(gwas_info) {
613613
data.table::rbindlist(fill = TRUE)
614614

615615
if (nrow(coloc_clustered_results) > 0) {
616+
worker_unique_study_ids <- study_extractions$unique_study_id
617+
components_with_worker <- coloc_clustered_results |>
618+
dplyr::filter(unique_study_id %in% worker_unique_study_ids) |>
619+
dplyr::distinct(ld_block, component)
616620
coloc_clustered_results <- coloc_clustered_results |>
621+
dplyr::inner_join(components_with_worker, by = c("ld_block", "component")) |>
617622
dplyr::group_by(ld_block, component) |>
618623
dplyr::mutate(coloc_group_id = dplyr::cur_group_id()) |>
619624
dplyr::ungroup() |>

0 commit comments

Comments
 (0)