compile_by_organism: Compile Ramani HiC Data Files into Data Frames stored in RDS...

Description Usage Arguments Value Progress updates Parallel processing Examples

View source: R/compile_by_organism.R

Description

Compile Ramani HiC Data Files into Data Frames stored in RDS files

Usage

1
2
3
4
5
6
compile_by_organism(
  samples,
  organisms = c("human", "mouse"),
  path = file.path("hicData", "GSE84920"),
  path_dest = "compiledData"
)

Arguments

samples

A character vector of K sample names.

organisms

A character vector of N organism names.

path

The folder where the input HiC data files ‘*.percentages,validPairs.txt.gz’ are located.

path_dest

The folder where the compiled RDS files should be saved.

Value

An K-by-N character matrix of pathnames of RDS files. Each RDS file contains a data.frame.

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 (organism, sample):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
12
13
14
15
16
17
## Not run: 
progressr::with_progress({
  files <- TopDomStudy::compile_by_organism(
              samples=c("GSM2254215_ML1", "GSM2254219_PL2",
                        "GSM2254216_ML2", "GSM2254218_PL1"),
              organisms="human",
              path="hicData/GSE84920", path_dest="compiledData"
           )
})
print(files)
#                human                                         
# GSM2254215_ML1 "compiledData/GSM2254215_ML1,human,unique.rds"
# GSM2254219_PL2 "compiledData/GSM2254219_PL2,human,unique.rds"
# GSM2254216_ML2 "compiledData/GSM2254216_ML2,human,unique.rds"
# GSM2254218_PL1 "compiledData/GSM2254218_PL1,human,unique.rds"

## End(Not run)

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