split_by_celltype: Split Per-Organism Compiled File Data into Subsets of Cell...

Description Usage Arguments Details Value Progress updates Parallel processing Examples

View source: R/split_by_celltype.R

Description

Split Per-Organism Compiled File Data into Subsets of Cell Types

Usage

1
2
3
4
5
split_by_celltype(
  celltypes = list(human = c("HAP1", "HeLa", "GM12878", "K562", "Asynchronous",
    "Nocadazole"), mouse = c("MEF", "Patski")),
  path = "compiledData"
)

Arguments

celltypes

A named list of character vectors.

path

The folder where input files are located and where output files are written.

Details

This function operates on files produces by compile_by_organism.

Value

A named list of the same structure as celltypes but where the character string are pathnames to files produced.

Progress updates

This function signals progressr::progression updates. To visualize, or in other ways render, progress information, wrap the call inside a progressr::with_progress call.

Parallel processing

This function supports processing of (celltype):s in parallel via the future framework. For example, setting future::plan("multisession") will parallelize on the local machine.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
progressr::with_progress({
  files <- TopDomStudy::split_by_celltype(celltypes=list(human="HAP1"),
                                          path="compiledData")
})
print(files)
# $human
#                                 HAP1 
# "compiledData/human,HAP1,unique.rds"

## End(Not run)

HenrikBengtsson/TopDomStudy documentation built on May 14, 2021, 1:49 p.m.