pair_pearson: Perform a pearson correlation test

View source: R/qtool_functions.R

pair_pearsonR Documentation

Perform a pearson correlation test

Description

This function calculates the Pearson's r

Usage

pair_pearson(cell, ccle, ccle.name, pvalue)

Arguments

cell

vector with bin-level copy number values of one sample

ccle

vector with bin-level copy number values of the cell model

ccle.name

name of the cell model

pvalue

a logical value to indicate if the empirical pvalue is calculated or not

Value

Pearson's r

Examples

posBins<-lapply(1,function(chr)
    getBinsStartsEnds(window=1000000, chr, lengthChr[chr]))
ccle_cn<-getCNbins(posBins=posBins, data=cells_segcn, samples=unique(cells_segcn$sample)[1:2])
exp_cell<-as.matrix(ccle_cn[,1])
mod_cell<-as.matrix(ccle_cn[,2])
r<-pair_pearson(exp_cell,mod_cell,unique(cells_segcn$sample)[2],pvalue=FALSE)

macintyrelab/CNpare documentation built on April 15, 2022, 4:46 a.m.