mergeFiles: Merge files

Description Usage Arguments Value Examples

View source: R/mergeFiles.R

Description

Merges two or more sample data frames into a single data frame and aggregates count, frequencyCount, and estimatedNumberGenomes.

Usage

1
mergeFiles(samples, file.list)

Arguments

samples

A character vector of the names of the samples that are to be merged in file.list.

file.list

A list of data frames imported using the LymphoSeq function readImmunoSeq that contain the sample names that are to be merged. "aminoAcid", "nucleotide", "count" and "frequencyCount" are required columns.

Value

Returns a data frame of the merged samples. The values of count, frequencyCount, and estimatedNumberGenomes are aggregated. That is, the sum of count and estimatedNumberGenomes columns of the merged data frame should equal the sum of the columns from the unmerged samples. Likewise, the frequencyCount of the merged data frame should add up to 100%. All other columns in the unmerged data frames are included in the merge data frame.

Examples

1
2
3
4
5
6
7
8
9
file.path <- system.file("extdata", "TCRB_sequencing", package = "LymphoSeq")

file.list <- readImmunoSeq(path = file.path)

TCRB_Day949_Merged <- mergeFiles(samples = c("TRB_CD4_949", 
   "TRB_CD8_949"), file.list)

# To combine the merged data frames with file.list
file.list <- c(list("TCRB_Day949_Merged" = TCRB_Day949_Merged), file.list)

davidcoffey/LymphoSeq documentation built on Dec. 31, 2019, 9:52 p.m.