normalizeData: Normalize anscombe transformed data

Description Usage Arguments Value See Also Examples

View source: R/normalizeData.R

Description

This function iterates over kmeansNormalize to perform normalization for all samples in the dataset. It returns an RangedSummarizedExperiment-class object normalized counts, cluster information and the variance of that cluster for that sample.

Usage

1
normalizeData(ansData, numClusters = 4)

Arguments

ansData

RangedSummarizedExperiment-class object from ansTransform.

numClusters

A number indicating the number of clusters to use for k-means clustering. (default: 4)

Value

RangedSummarizedExperiment-class containing the normalized counts, cluster information and the variance of the cluster in the sample.

See Also

kmeansNormalize which this function calls.

Examples

1
2
3
4
5
6
7
8
9
exRange <- GRanges(seqnames=c("chr1","chr2","chr3","chr4"),
ranges=IRanges(start=c(1000,2000,3000,4000),end=c(1500,2500,3500,4500)))
sampleInfo <- read.table(system.file("extdata", "sample_info.txt", 
package="CSSQ",mustWork = TRUE),sep="\t",header=TRUE)
exCount <- matrix(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16),nrow=4,ncol=4)
exData <- SummarizedExperiment(assays = list(ansCount=exCount),
rowRanges=exRange,colData=sampleInfo)
normExData <- normalizeData(exData,numClusters=2)
assays(normExData)$normCount

CSSQ documentation built on Nov. 8, 2020, 6:47 p.m.