Learn R Programming

bumphunter (version 1.12.0)

dummyData: Generate dummy data for use with bumphunter functions

Description

This function generates a small dummy dataset representing samples from two different groups (cases and controls) that is used in bumphunter examples.

Usage

dummyData(n1 = 5, n2 = 5, sd = 0.2, l = 100, spacing = 100, clusterSpacing=1e5, numClusters=5)

Arguments

n1
Number of samples in group 1 (controls)
n2
Number of samples in group 2 (cases)
sd
Within group standard deviation to be used when simulating data
l
The number of genomic locations for which to simulate data
spacing
The average spacing between locations. The actual locations have a random component so the actual spacing will be non-uniform
clusterSpacing
The spacing between clusters. (Specifically, the spacing between the first location in each cluster.)
numClusters
Divide the genomic locations into this number of clusters, each of which will contain locations spaced spacing bp apart.

Value

A list containing data that can be used with various bumphunter functions.
mat
A simulated data matrix with rows representing genomic locations and columns representing samples.
design
Design matrix with rows representing samples and columns representing covariates.
chr
A character vector with the chromosomes of each location.
pos
A numeric vector representing the chromosomal position.
cluster
A vector representing the cluster of each locations
n1
Number of samples in cluster 1
n2
Number of samples in cluster 2

Examples

Run this code
dat <- dummyData()
names(dat)
head(dat$pos)

Run the code above in your browser using DataLab