select_replicates: Choose best replicates to keep

View source: R/table_utils.R

select_replicatesR Documentation

Choose best replicates to keep

Description

Reduce sample list by subsetting replicates based on a specified metric.

Usage

select_replicates(data, id, metric, max_replicates = 1, decreasing = T)

Arguments

data

Data frame with at least two columns, one with a sample ID for detecting replicates and another with a metric to use for selecting replicates.

id

Sample ID to use for detecting replicates.

metric

Metric name to use for selecting replicates.

max_replicates

Maximum number of replicates to keep from a replicate set.

decreasing

If 'TRUE', choose replicates by starting with the highest metric value. Otherwise choose replicates by starting with the lowest metric value.

Details

Detects replicate samples from a sample list using ID duplicates and retains only replicate(s) that meet selection criteria for the user-specified metric.

Value

A vector of indices for selected sample replicates as well as samples without replicates. Indices correspond to rows in data.


bryancquach/omixjutsu documentation built on Jan. 29, 2023, 3:47 p.m.