reshapeData {doblin}R Documentation

Reshape Barcode Abundance Data to Frequency Format

Description

Transforms raw barcode abundance data into a tidy long-format data frame, computing summary statistics for each barcode (ID), including maximum, initial, final, and average frequencies across time points.

Usage

reshapeData(input_data)

Arguments

input_data

A data frame with exactly three columns: ID (character or factor), Time (numeric), and Reads (numeric). Each row corresponds to a measurement for one barcode at one time point.

Details

This function expects a data frame with three columns: ID, Time, and Reads. Frequencies are computed by normalizing the Reads across all barcodes for each time point.

Value

A tidy data frame with columns: ID, max, start, final, mean, Time, and Frequency. Frequencies are normalized across all barcodes per time point. The result is ordered by decreasing max frequency.

Examples

# Load demo barcode count data (installed with the package)
demo_file <- system.file("extdata", "demo_input.csv", package = "doblin")
input_dataframe <- readr::read_csv(demo_file, show_col_types = FALSE)

# Reshape data to long-format with normalized frequencies +
# sort data by descending maximum frequency
reshaped_df <- reshapeData(input_dataframe)

[Package doblin version 0.1.1 Index]