getSumDist: Compute the summation of distances

Description Usage Arguments Value Author(s) Examples

Description

Canonical positions are set on a BAF-LRR plot with given AGP value. This function finds the distance from each data point to its nearest canonical position and returns the summation.

Usage

1
getSumDist(oo, p, sam.dat, method = "both", type = 1, para)

Arguments

oo

Origin Cluster, as returned from getOrigin()

p

AGP value. see getGrid() for details.

sam.dat

numeric matrix, as returned from getSeg() or getSegChr()

method

string, chosen from 'both','logR' and 'BAF', the column(s) from sam.dat to weigh the distance from a data point to canonical positions. If 'logR' or 'BAF', number of LRR or BAF markers will be used as weight. If 'both', geometric average of both numbers will be used.

type

integer, ploidy indicator. 1, diploid; 2, tetraploid; 3, hexaploid

para

list, parameters returned from getPara()

Value

A list inherited from the list returned from getCanonicalLines(), with extra elements being:

SD

sum of distances

clist

indices of data points close to at least one regression line.

plist

indices of data points close to at least one canonical position.

Author(s)

Bo Li

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)
cali=getSumDist(oo,0.5,dd.dat,para=para)


Search within the CHAT package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.