Learn R Programming

CHAT (version 1.1)

getPloidy: Genomewide average ploidy

Description

This function returns the genomewide average ploidy of aneuploid fraction and overall of the sample.

Usage

getPloidy(p, type = 1, sam.dat, oo)

Arguments

p
AGP value. see getGrid() for details.
type
integer, ploidy indicator. 1, diploid; 2, tetraploid; 3, hexaploid
sam.dat
numeric matrix, as returned from getSeg() or getSegChr()
oo
Origin Cluster, as returned from getOrigin()

Value

Ploidy of the overall sample and ploidy of the aneuploid proportion are returned.

Examples

Run this code

data(A0SD.BAF)
data(A0SD.LRR)
seg.dat=c()
for(CHR in c(8,9,10)){
	baf=A0SD.BAF[A0SD.BAF[,2]==CHR,]
	lrr=A0SD.LRR[A0SD.LRR[,2]==CHR,]
	x=getSegChr(baf,lrr)
	seg.dat=rbind(seg.dat,x)
}
dd.dat=seg.dat[,2:8]
rownames(dd.dat)=seg.dat[,1]
mode(dd.dat)='numeric'
para=getPara()
oo=getOrigin(dd.dat,para=para)
getPloidy(0.5,sam.dat=dd.dat,oo=oo)

Run the code above in your browser using DataLab