Remove Batch Effect from Cluster Hits
remove_batch_effect_cluster_hits.Rd
This function removes batch effects from the data for each level specified by the condition. It supports both isolated and integrated modes, with optional handling for a second batch column.
Usage
remove_batch_effect_cluster_hits(
data,
meta,
condition,
meta_batch_column,
meta_batch2_column,
design,
mode,
spline_params
)
Arguments
- data
A dataframe containing the main data.
- meta
A dataframe containing meta information.
- condition
A string specifying the column in `meta` that divides the experiment into levels.
- meta_batch_column
A string specifying the column in `meta` that indicates batch information.
- meta_batch2_column
A string specifying the second batch column in `meta`, if applicable.
- design
A design matrix for the experiment.
- mode
A string indicating the mode of operation: "isolated" or "integrated".
- spline_params
A list of spline parameters for the design matrix.
Details
The function operates in two modes:
- isolated
Processes each level independently, using only data from that level.
- integrated
Processes the entire dataset together.
If `meta_batch_column` is specified, the function removes batch effects using `removeBatchEffect`. If a second batch column (`meta_batch2_column`) is specified, it is also included in the batch effect removal.