getSegChr: Perform binned DNA segmentation by chromosome

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getSegChr.R

Description

This function computes folded BAF and logR ratios for binned DNA segments for a given chromosome.

Usage

1
2
getSegChr(bb.chr = NULL, ll.chr = NULL, sam.col=5, control=TRUE, 
thr.hets=0.1, bin = 1000, data.type='copy',controlOne=0)

Arguments

bb.chr

numeric matrix, original B-allele frequency for a given chromosome for all samples.

ll.chr

numeric matrix, original logR ratio for a given chromosome for all samples.

sam.col

the index of the column in BAF or LRR files where the first sample starts

control

If TRUE, each tumor sample is paired with normal immediately after it. The columns of the data file is organized : sample_1, control_1, sample_2, control_2 .... If FALSE, each sample serves the control of itself.

thr.hets

lower threshold of calling homozygous markers. BAF<=thr.hets or BAF>=1-thr.hets are considered homozygous.

bin

integer, number of markers contained in each bin.

data.type

character string chosen from c('copy', 'log'). If 'copy', the value for LRR markers represent the copy number of SNPs. If 'log', the value is log2 based copy number intensity.

controlOne

default 0. If positive, must be an integer number indicating the index of one control sample in the sample list. This control will be used for all the samples.

Value

a matrix containing the following columns: chromosome, start position, end position, median LRR value, number of LRR markers, folded BAF value, number of germline heterozygous BAF markers, with row names being sample ID.

Author(s)

Bo Li

See Also

getSeg

Examples

1
2
3
4
5
6
7
8
library(CHAT)
data(A0SD.BAF)
data(A0SD.LRR)
CHR=8
chr8.baf=A0SD.BAF[which(A0SD.BAF[,2]==CHR),]
chr8.lrr=A0SD.LRR[which(A0SD.LRR[,2]==CHR),]
dd=getSegChr(chr8.baf,chr8.lrr)
print(dd[1:4,])

Example output

Loading required package: parallel
Loading required package: DNAcopy
Loading required package: DPpackage
 
DPpackage 1.1-7.4
 
Copyright (C) 2006 - 2012, Alejandro Jara
Department of Statistics
P.U. Catolica de Chile
 
Support provided by Fondecyt
11100144 grant.
 
processing  8 
............................     id                 chr                       logR.mean            bin   
[1,] "TCGA.A1.A0SD.01A" "8" "220007"   "5366616"  "0.0652276227756192" "1000"
[2,] "TCGA.A1.A0SD.01A" "8" "5370001"  "11082559" "0.0731347046302153" "1000"
[3,] "TCGA.A1.A0SD.01A" "8" "11083792" "18487665" "0.065572311593622"  "1000"
[4,] "TCGA.A1.A0SD.01A" "8" "18488803" "26866779" "0.0932221105390241" "1000"
     BAF.mean             bin   
[1,] "0.021610357244357"  "1000"
[2,] "0.0215504612180461" "1000"
[3,] "0.0258134550412758" "1000"
[4,] "0"                  "1000"

CHAT documentation built on May 29, 2017, 10:32 p.m.