overlap_scores_partitions: Calculates TopDom Overlap Scores Across Partitions

Description Usage Arguments Value Parallel processing

View source: R/overlap_scores_partitions.R

Description

Calculates TopDom Overlap Scores Across Partitions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
overlap_scores_partitions(
  reads,
  bin_size,
  partition_by,
  rho,
  reference_rho = 1/2,
  nsamples = 100L,
  seed = TRUE,
  chrs = NULL,
  min_cell_size = 1L,
  dataset,
  cell_ids = NULL,
  window_size = 5L,
  path_out = ".",
  mainseed = 48879,
  force = FALSE,
  as = c("pathname", "value"),
  verbose = FALSE
)

Arguments

reads

A base::data.frame.

bin_size

A positive numeric.

partition_by

A string specifying how to partition; one of "reads", "cells", "reads_by_half", and "cells_by_half".

rho, reference_rho

A numeric in (0,1/2] specifying the relative size of the partitions.

nsamples

Number of random samples.

seed

Random seed for reproducible (parallel) random number generation (RNG).

chrs

(optional, filter) Names of chromosomes to iterate over. Defaults to the chromosomes in reads$chr_a.

min_cell_size

(optional, filter) The minimum number of reads for a cell to be included. Cells with less reads are dropped.

dataset

(optional) ...

cell_ids

(optional, filter) ...

window_size

A positive integer passed to TopDom::TopDom. Defaults to 5L, which is the same as the default in TopDom.

path_out

The root folder that will contain the overlapScoreData/ folder to which RDS files are written.

mainseed

...

force

If FALSE, already processed partitions are skipped, otherwise not.

as

Should values or pathnames be returned?

verbose

If TRUE, verbose message are produced, otherwise not.

Value

A named list of length length(chrs) with names as chrs. Each list elements contains nsamples pathnames of RDS files.

Parallel processing

The future framework is used to parallelize TopDom::TopDom in three layers:

  1. across chromosomes (argument chrs)

  2. across random samples (argument nsamples)

  3. per random sample, across partitions (argument partition_by)

    • typically two ('reference' and one more)


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