Last data update: 2014.03.03

R: Performs CNV Correction and Correlation Matrix Segmentation
SegCorrR Documentation

Performs CNV Correction and Correlation Matrix Segmentation

Description

Gene expression is corrected for CNV events must not contain NA's and genes with same expression value (i.e. null gene expression). Segmentation is used to detect changes in the correlation pattern. Regions with high correlation are identified using an exact test.

Usage

SegCorr(CHR, EXP, genes,S, CNV, SNPSMOOTH, Position.EXP, 
SNP.CHR, SNP, Position.SNP, group)

Arguments

CHR

Chromosome allocation vector for the genes.

EXP

Gene expression matrix (raw/corrected for CNV). Columns correspond to patients and rows to genes. The expression matrix must not contain either NA's or genes with same expression value (i.e. null gene expression)

genes

Gene ID(name) vector.

S

Threshold for model selection. Default S=0.7.

CNV

Logical variable indicating whether to perform CNV correction. When CNV=T, the correction is performed. Default value CNV=F.

SNPSMOOTH

(Optional Argument when CNV=T) Logical variable indicating whether to perform SNPSMOOTH. When SNPSMOOTH=T, the smoothing is performed. Default value SNPSMOOTH=F.

Position.EXP

(Optional Argument when CNV=T) Expression position matrix. First column is the start position and the second is the end position.

SNP.CHR

(Optional Argument when CNV=T) Chromosome allocation vector for genomic probes.

SNP

(Optional Argument when CNV=T) SNP profile matrix not containing NA's. Columns correspond to patients and rows to probes.

Position.SNP

(Optional Argument when CNV=T) vector with SNP positions

group

(Optional Argument when CNV=T and SNPSMOOTH=T) Indicator denoting the different variance groups among the different patients. By default, all genomic profiles allocated to one group.

Details

Overlapping genes may correspond to the same genomic probes.

Value

Results

Matrix containing information about the genomic regions. Each region corresponds to a row of the matrix, the one with the smallest p-value is on the top of the list.

Results$CHR

Chromosome

Results$Start/End

the region boundaries with repsect to the physical location of the gene in the chromosome

Results$Rho

ρ correlation

Results$length

number of genes in the region

Results$first/last gene

name of the first/last gene in the region

Results$p-value

p-value as obtained from the test

Results$genes

names of the genes belonging to the region

Results$p-valueadj

p-value of the region corrected for multiple testing

Chromosome.Inf

Matrix containing the estimated background correlation (rho0.hat) per chromsome, the number of segments and the log-loglikehood.

EXP.corrected

If the CNV option is chosen, the corrected signal is given.

Author(s)

E. I. Delatola, E. Lebarbier, T. Mary-Huard, F. Radvanyi, S. Robin, J. Wong.

References

Delatola E. I., Lebarbier E., Mary-Huard T., Radvanyi F., Robin S., Wong J.(2015). SegCorr: a statistical procedure for the detection of genomic regions of correlated expression. Preprint on Arxiv.

See Also

CNV_correction,segmentation

Examples

data('EXP_raw')
CHR = rep(1,dim(EXP_raw)[1])

results = SegCorr(CHR = CHR, EXP = EXP_raw, CNV = FALSE,S=0.7)

################drawing the heatmap for one region ###########################
tau = results$Region.List[1,2]: results$Region.List[1,3] 
heatmap(as.matrix(EXP_raw[tau,]))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SegCorr)
Loading required package: cghseg
Loading required package: parallel
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SegCorr/SegCorr.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SegCorr
> ### Title: Performs CNV Correction and Correlation Matrix Segmentation
> ### Aliases: SegCorr
> ### Keywords: models htest multivariate
> 
> ### ** Examples
> 
> data('EXP_raw')
> CHR = rep(1,dim(EXP_raw)[1])
> 
> results = SegCorr(CHR = CHR, EXP = EXP_raw, CNV = FALSE,S=0.7)
Performing block diagonal segmentation for chromosome = 1
Block diagonal segmentation: rectangles, blocks, costs, segmentation
Warning messages:
1: In SegCorr(CHR = CHR, EXP = EXP_raw, CNV = FALSE, S = 0.7) :
  Gene names missing: using artificial names
2: In segmentation(unique(CHR[loc]), EXP[loc, ], genes[loc]) :
  segmentation: Using default value for S
> 
> ################drawing the heatmap for one region ###########################
> tau = results$Region.List[1,2]: results$Region.List[1,3] 
> heatmap(as.matrix(EXP_raw[tau,]))
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>