subsetCNR: Subset a set of bins or genes from a CNR object

Description Usage Arguments Value Examples

View source: R/subsetCNR.R

Description

This function pulls out a section of the genome for further analysis.

Usage

1
2
3
4
5
6
7
8
9
subsetCNR(
  cnr,
  bins = NULL,
  genes = NULL,
  chrom = NULL,
  start = NULL,
  end = NULL,
  ...
)

Arguments

cnr

a cnr bundle

bins

a vector of bins to keep

genes

a vector of genes to keep

chrom

a vector of chromosomes, or single chromosome if genomic coordinates are used

start

a start position

end

an end position

...

additional parameters e.g. padding to add bins when coordinates are used

Value

Returns a cnr object with only the desired bins. This function also subsets the gene index and chromInfo as well

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(cnr)
data(segCol)

## subset based on bins
bins1.100 <- subsetCNR(cnr, bins = 1:100)

## subset based on genes
genes.3 <- subsetCNR(cnr, genes = c("CDK4", "MDM2", "HMGA2", "TP53"))

## subset based on chromosomes
chrom6.12 <- subsetCNR(cnr, chrom = c(6, 12))

## subset based on genomic coordinates
chrom12q13.15 <- subsetCNR(cnr, chrom = 12, start = 46000000, end = 71000000)

SingerLab/gac documentation built on Aug. 14, 2021, 10:57 a.m.