calcFreqs: calcFreqs

Description Usage Arguments Examples

Description

calcFreqs Given two numeric vectors this function overimposes a grid on the scatterplot defined by YMet~Xmet #' and returns a 3X3 matrix of counts with the number of points in each cell of the grid #' for given vertical and horizontal lines.

Usage

1
2
calcFreqs(xMet, yExp, x1, x2, y1 = NULL, y2 = NULL, percY1 = 1/3,
  percY2 = 2/3)

Arguments

xMet

First numeric vector which, in principle, contains the methylation values.

yExp

Second numeric vector which, in principle, contains the expression values.

x1, x2

Coordinates of vertical points in the X axis. Because it is expected to contain methylation values that vary between 0 and 1 the default values are 1/3 and 2/3.

y1, y2

Coordinates of vertical points in the Y axis. Leaving them as NULL assigns them the percentiles of yVec defined by 'percY1' and 'percY2'.

percY1, percY2

Values used to act as default for 'y1'and 'y2' when these are set to 'NULL'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
data(trueGenes)
xVec<- as.numeric(myMetilData[trueGene1,])
yVec<-as.numeric(myExprData[trueGene1,])
titolT <- trueGene1
plotGeneSel(xMet=xVec, yExp=yVec, titleText=titolT, x1=1/3, x2=2/3)
messageTitle(paste("Cell counts for gene",trueGene1))
calcFreqs(xMet=xVec, yExp=yVec, x1=1/3, x2=2/3, y1=NULL, y2=NULL, percY1=1/3, percY2=2/3)

xVec<- as.numeric(myMetilData[falseGene1,])
yVec<-as.numeric(myExprData[falseGene1,])
titolF <- falseGene1
messageTitle(paste("Cell counts for gene",falseGene1))
plotGeneSel(xMet=xVec, yExp=yVec, titleText=titolF, x1=1/3, x2=2/3)
calcFreqs(xMet=xVec, yExp=yVec, x1=1/3, x2=2/3, y1=NULL, y2=NULL, percY1=1/3, percY2=2/3)

## End(Not run)

bertamiro/lpattern documentation built on July 19, 2019, 12:56 p.m.