Skip to content

Allow for more than one batch for a given subject #27

@natalie-23-gill

Description

@natalie-23-gill

clustOpt/R/clustOpt.R

Lines 310 to 317 in 2a51c01

this_batch <- input@meta.data |>
dplyr::filter(get(subject_ids) == test_id) |>
dplyr::pull(get(within_batch)) |>
unique()
if (length(this_batch) > 1) {
stop(paste0("More than one batch found for this subject: ", test_id))
}

  • In some cases the same subject may be included across multiple batches, particularly for CyTOF datasets, for batch correction purposes

Proposed solution:

  • In those cases, a warning should be issued and a new subject id created for these in the format [batch]_[subject] which should allow for the existing code to run as is

Metadata

Metadata

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions