subsetSegments: Retrieve a subset of segments

Description Usage Arguments Value Author(s) Examples

View source: R/subsetSegments.r

Description

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

Usage

1
 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

1
2
3
4
5
6
#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))

igordot/copynumber documentation built on Sept. 18, 2020, 8:48 a.m.