mergeFiles {LymphoSeq} | R Documentation

## Merge files

### Description

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

### Usage

    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

    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)

[Package LymphoSeq version 1.14.0 Index]