View source: R/quality_control.R
mergeSocratesRDS | R Documentation |
This function merges Socrates data RDS objects. Useful for joining replicates and multiple samples
for downstream analysis. obj simple way to aggregate multiple samples into obj single socrates
object is to move all the samples of interest into obj directory and load the paths with
list.files. IMPORTANT - only merge RDS objects where the same bins/peaks were used for generating
the sparse matrices. The easiest way to ensure mergeable objects is to use the same window size
(instead of ACRs) for the function generateMatrix
from each sample.
mergeSocratesRDS(filenames = NULL, obj.list = NULL)
filenames |
Named vector of filepaths. |
obj.list |
Named list of Socrates objects output from |
input.files <- list.files(pattern="*.rds", path="/path/to/rds/directory")input.files1 "rep1.rds" "rep2.rds"
names(input.files) <- c("rep1", "rep2")input.filesrep1 rep2"rep1.rds" "rep2.rds"
merged.obj <- mergeSocratesRDS(filenames=input.files)
str(merged.obj)
all.soc.obj <- list(rep1=soc.obj1, rep22=soc.obj2)merged.obj <- mergeSocratesRDS(obj.list=all.soc.obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.