createNullSampling: Building a null hypothesis data

View source: R/createNullSampling.R

createNullSamplingR Documentation

Building a null hypothesis data

Description

Create a null sampling data (N times) and write them to a file

Usage

createNullSampling(X, groupLabel, N = 100, verbose = TRUE)

Arguments

X

The spectral dataset in the matrix format in which each row contains a single sample

groupLabel

Group label of samples in the dataset

N

The number of iteration for creating null sample distribution

verbose

A boolean value to allow print out process information

Value

A matrix with N rows containing the null distribution.

Author(s)

Trung Nghia Vu

Examples

res=makeSimulatedData();
X=res$data;
groupLabel=res$label;
peakList <- detectSpecPeaks(X,
                            nDivRange = c(128),
                            scales = seq(1, 16, 2),
                            baselineThresh = 50000,
                            SNR.Th = -1,
                            verbose=FALSE
);
resFindRef<- findRef(peakList);
refInd <- resFindRef$refInd;
maxShift = 50;
Y <- dohCluster(X,
                peakList = peakList,
                refInd = refInd,
                maxShift  = maxShift,
                acceptLostPeak = TRUE, verbose=FALSE);
# find the BW-statistic
BW = BWR(Y, groupLabel);
H0 = createNullSampling(Y, groupLabel, N = 100,verbose=FALSE)


speaq documentation built on May 23, 2022, 5:06 p.m.