syntheticNucMapFromDistValidation: Parameter validation for the 'syntheticNucMapFromDist'...

View source: R/nucleoSimInternFunctions.R

syntheticNucMapFromDistValidationR Documentation

Parameter validation for the syntheticNucMapFromDist function

Description

Validate that all values passed to the function are formated for the syntheticNucMapFromDist function.

Usage

syntheticNucMapFromDistValidation(
  wp.num,
  wp.del,
  wp.var,
  fuz.num,
  fuz.var,
  max.cover,
  nuc.len,
  len.var,
  lin.len,
  rnd.seed,
  as.ratio
)

Arguments

wp.num

a non-negative integer, the number of well-positioned (non overlapping) nucleosomes.

wp.del

a non-negative integer, the number of well-positioned nucleosomes to remove to create uncovered regions.

wp.var

a non-negative integer, the variance of the starting position of the sequences associated with well-positioned nucleosomes. This parameter introduces some variation in the starting position of the sequences describing a nucleosome.

fuz.num

a non-negative integer, the number of fuzzy nucleosomes. Those nucleosomes can overlap other well-positioned or fuzzy nucleosomes.

fuz.var

a non-negative integer, the variance of the fuzzy nucleosomes. This variance can be different than the one used for the well-positioned nucleosome reads.

max.cover

a positive integer, the maximum coverage for one nucleosome. The final coverage can have a higher value than max.cover since reads from differents nucleosomes can be overlapping.

nuc.len

a non-negative integer, the nucleosome length.

len.var

a non-negative integer, the variance of the distance between a forward read and its paired reverse read.

lin.len

a non-negative integer, the length of the DNA linker DNA.

rnd.seed

a single value, interpreted as an integer, or NULL. If a integer is given, the value is used to set the seed of the random number generator. By fixing the seed, the generated results can be reproduced.

as.ratio

a logical, if TRUE, a synthetic naked DNA control map is created and the ratio between it and the nucleosome coverage are calculated. It can be used to simulate hybridization ratio data, like the one in Tiling Arrays. Both control map and calculated ratio are returned.

Value

0 indicating that all parameters validations have been successful.

Author(s)

Astrid Deschenes

Examples


## The function returns 0 when all paramaters are valid
nucleoSim:::syntheticNucMapFromDistValidation(wp.num = 20, wp.del = 2,
wp.var = 3, fuz.num = 10, fuz.var = 5, max.cover = 100, nuc.len = 147,
len.var = 4, lin.len = 40, rnd.seed = 201, as.ratio = FALSE)

## The function raises an error when at least one paramater is not valid
## Not run: nucleoSim:::syntheticNucMapFromDistValidation(wp.num = -1,
wp.del = 2, wp.var = 3, fuz.num = 10, fuz.var = 5, max.cover = 100,
nuc.len = 147, len.var = 4, lin.len = 40, rnd.seed = 201, as.ratio = FALSE)
## End(Not run)
## Not run: nucleoSim:::syntheticNucMapFromDistValidation(wp.num = 20,
wp.del = 2, wp.var = -3, fuz.num = 10, fuz.var = 5, max.cover = 100,
nuc.len = 147, len.var = 4, lin.len = 40, rnd.seed = 201, as.ratio = FALSE)
## End(Not run)


ArnaudDroitLab/nucleoSim documentation built on March 17, 2022, 11 p.m.