Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

subsetSegments

Retrieve a subset of segments


Description

This function returns a subset of segments according to the input and the specified chromosomes and/or samples.

Usage

subsetSegments(segments, chrom = NULL, sample = NULL, sep="\t", ...)

Arguments

segments

either a data frame or the name of a tab-separated file from which segmentation results can be read. Segmentation results may come from pcf, multipcf or aspcf.

chrom

a numeric or character vector with chromosome(s) for which segments should be selected. If unspecified, all chromosomes in segments will be selected.

sample

a numeric vector indicating for which sample(s) segments should be selected. The number(s) should correspond to the sample's place (in order of appearance) in segments.

sep

the separator of the input files if segments is a file. Default is tab.

...

optional parameters to be passed to read.table in the case where segments is to be read from file.

Value

A data frame containing the desired subset of segments.

Author(s)

Gro Nilsen

Examples

#Load lymphoma data
data(lymphoma)

#Select segments only for samples 1 and 6 and chromosomes 1:9:
segments <- pcf(lymphoma,gamma=12)
sub.segments <- subsetSegments(segments=segments,chrom=c(1:9),sample=c(1,6))

copynumber

Segmentation of single- and multi-track copy number data by penalized least squares regression.

v1.30.0
Artistic-2.0
Authors
Gro Nilsen, Knut Liestoel and Ole Christian Lingjaerde.
Initial release
2013-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.