subset.CNA: Subset a 'Copy Number Array' data object

Description Usage Arguments Value Examples

View source: R/DNAcopyMethods.R

Description

Function to return a subset of a copy number array data object by a list of chromosomes and sample.

Usage

1
2
  ## S3 method for class 'CNA'
subset(x, chromlist=NULL, samplelist=NULL, ...)

Arguments

x

Copy number array data object

chromlist

chromosomes of interest. Should be a subset of the valid chromosome names in the original data.

samplelist

samples of interest. Can be integers denoting the samples of interest or a vector of valid sample names.

...

other arguments which may be passed to subset.

Value

An object of class CNA with the data for the list of chromosomes and samples of interest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(coriell)

#Combine into one CNA object to prepare for analysis on Chromosomes 1-23

CNA.object <- CNA(cbind(coriell$Coriell.05296,coriell$Coriell.13330),
                  coriell$Chromosome,coriell$Position,
                  data.type="logratio",sampleid=c("c05296","c13330"))

#Take the first ten chromosomes of the first sample

#subset.CNA.object <- subset.CNA(CNA.object,chromlist=1:10,samplelist="c05296")
subset.CNA.object <- subset(CNA.object,chromlist=1:10,samplelist="c05296")

DNAcopy documentation built on Nov. 8, 2020, 5:48 p.m.