Learn R Programming

CHAT (version 1.1)

getGrid: Find all the coordinates for canonical points

Description

This function computes the grid of canonical points on a BAF-LRR plot

Usage

getGrid(x0, y0, p, type = 1, Nc = 10, BAF = "all", para = para)

Arguments

x0
x coordinate for the Origin Cluster
y0
y coordinate for the Origin Cluster
p
numeric, an AGP value. See details.
type
integer, ploidy indicator. 1, diploid; 2, tetraploid; 3, hexaploid
Nc
integer, maximum number of total copy number to be considered.
BAF
output option. BAF either takes the value 'all' or an integer number. If BAF=0, only LOH track will be returned; if BAF=1, only canonical points with configuration (1,nt) will be returned; etc.
para
list, parameters returned from getPara()

Value

A numeric matrix with two columns: x and y coordinates of canonical positions.

Details

On a BAF-LRR plot, DNA segments with different combinations of minor allele (nb) and total alleles (nt) are located on different positions, namely canonical positions. The coordinates of these positions are affected by both nb, nt and the possible contraction rate towards the origin, which represents the fraction of cells without any copy number alterations in the tumor sample. the input, p is the contraction rate, later will be called aneuploid genome proportion, or AGP.

Examples

Run this code
x0=0.02
y0=0.1
p=0.8
gg=getGrid(x0,y0,p,para=getPara())
## place canonical points on a BAF-LRR plot, with AGP=0.8
plot(0,0,cex=0,xlim=c(0,0.5),ylim=c(-1,3),xlab='BAF',ylab='LRR')
points(gg,pch='*',cex=2,lwd=2)

Run the code above in your browser using DataLab