Last data update: 2014.03.03

R: Interpolation of pcf-estimates.
interpolate.pcfR Documentation

Interpolation of pcf-estimates.

Description

Given a segmentation by pcf, interpolate pcf-estimates for specific positions.

Usage

interpolate.pcf(segments,x)

Arguments

segments

a data frame containing the segmentation results from pcf.

x

matrix or data.frame where the first column gives chrosomomes and the second gives positions.

Details

Pcf-estimates are interpolated for the chromosomes and postions specified in x.

Value

A data frame where the first two columns give the chromsomes and positions specified in the input x and the remaining columns give the interpolated pcf-estimate for each sample represented in segments.

Note

The positions in segments and x must be of the same unit (bp, kbp, or mbp).

Author(s)

Gro Nilsen, Ole Christian Lingjaerde.

See Also

pcf

Examples

#Load the lymphoma data set:
data(lymphoma)

#Take out a smaller subset of 3 samples (using subsetData):
sub.lymphoma <- subsetData(lymphoma,sample=1:3)

#Run pcf:
seg <- pcf(data=sub.lymphoma,gamma=12)

#Make a matrix with two positions and chromosomes for which we want to 
#interpolate the pcf-estimate:
pos <-  c(2000000,50000000)
chr <- c(1,2)
x <- cbind(chr,pos)

#Interpolate
int.pcf <- interpolate.pcf(seg,x)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(copynumber)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/copynumber/interpolate.pcf.rd_%03d_medium.png", width=480, height=480)
> ### Name: interpolate.pcf
> ### Title: Interpolation of pcf-estimates.
> ### Aliases: interpolate.pcf
> 
> ### ** Examples
> 
> #Load the lymphoma data set:
> data(lymphoma)
> 
> #Take out a smaller subset of 3 samples (using subsetData):
> sub.lymphoma <- subsetData(lymphoma,sample=1:3)
> 
> #Run pcf:
> seg <- pcf(data=sub.lymphoma,gamma=12)
pcf finished for chromosome arm 1p 
pcf finished for chromosome arm 1q 
pcf finished for chromosome arm 2p 
pcf finished for chromosome arm 2q 
pcf finished for chromosome arm 3p 
pcf finished for chromosome arm 3q 
pcf finished for chromosome arm 4p 
pcf finished for chromosome arm 4q 
pcf finished for chromosome arm 5p 
pcf finished for chromosome arm 5q 
pcf finished for chromosome arm 6p 
pcf finished for chromosome arm 6q 
pcf finished for chromosome arm 7p 
pcf finished for chromosome arm 7q 
pcf finished for chromosome arm 8p 
pcf finished for chromosome arm 8q 
pcf finished for chromosome arm 9p 
pcf finished for chromosome arm 9q 
pcf finished for chromosome arm 10p 
pcf finished for chromosome arm 10q 
pcf finished for chromosome arm 11p 
pcf finished for chromosome arm 11q 
pcf finished for chromosome arm 12p 
pcf finished for chromosome arm 12q 
pcf finished for chromosome arm 13q 
pcf finished for chromosome arm 14q 
pcf finished for chromosome arm 15q 
pcf finished for chromosome arm 16p 
pcf finished for chromosome arm 16q 
pcf finished for chromosome arm 17p 
pcf finished for chromosome arm 17q 
pcf finished for chromosome arm 18p 
pcf finished for chromosome arm 18q 
pcf finished for chromosome arm 19p 
pcf finished for chromosome arm 19q 
pcf finished for chromosome arm 20p 
pcf finished for chromosome arm 20q 
pcf finished for chromosome arm 21q 
pcf finished for chromosome arm 22q 
pcf finished for chromosome arm 23p 
pcf finished for chromosome arm 23q 
> 
> #Make a matrix with two positions and chromosomes for which we want to 
> #interpolate the pcf-estimate:
> pos <-  c(2000000,50000000)
> chr <- c(1,2)
> x <- cbind(chr,pos)
> 
> #Interpolate
> int.pcf <- interpolate.pcf(seg,x)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>