mergeSamples {Chicago} | R Documentation |
Merge a number of chicagoData
objects together, summarising their counts into a normalised value.
mergeSamples(cdl, normalise = TRUE, NcolOut = "N", NcolNormPrefix = "NNorm", mergeMethod = c("weightedMean", "mean")[1], repNormCounts = (mergeMethod=="mean"))
cdl |
A |
normalise |
If |
NcolOut |
The column to store the normalised counts in. |
NcolNormPrefix |
Each sample gains a normalised count column, that begins with this prefix. |
mergeMethod |
If |
repNormCounts |
Report normalised counts for each replicate (by dividing them by s_k) in the <NcolNormPrefix>.<sampleNo> column (by default, NNorm.1, NNorm.2, etc.). This option is on by default when |
An object of class chicagoData
, with a params(cd)$s_k
slot added representing the per-sample scaling factors used in normalisation.
Raw per-sample counts will be stored in the N.<sampleNo> column (N.1, N.2, etc.)
Mikhail Spivakov, Jonathan Cairns, Paula Freire Pritchett
filesDir <- file.path(system.file("extdata", package="Chicago"), "unitTestData") files <- file.path(filesDir, dir(filesDir)) print(files) ##we will read in and merge these files designDir <- file.path(system.file("extdata", package="Chicago"), "unitTestDesign") cdA <- setExperiment(designDir=designDir) cdA <- readSample(files[1], cdA) cdB <- setExperiment(designDir=designDir) cdB <- readSample(files[2], cdB) cdMerged <- mergeSamples(list(cdA, cdB))