makeCNPmask.chrom: Given a set of copy-number events, create a DNA copy-number...

View source: R/makeCNPmask.chrom.R

makeCNPmask.chromR Documentation

Given a set of copy-number events, create a DNA copy-number mask for one specific chromosome.

Description

The function takes as an input a set of intervals with integer-valued boundary positions. It then finds interval regions where the event count is above each of two thresholds, upper and lower, and returns those interval regions with the count above the lower threshold that contain interval regions with the count above the upper threshold. This is done for one specific chromosome.

Usage

makeCNPmask.chrom(imat, startcol = 1, endcol = 2, nprof = 1, uthresh, dthresh)

Arguments

imat

A matrix or a data.frame tabulating the chromosome numbers and endpoint positions of the interval events.

startcol

A character string or numeric (representing an integer) specifying the column of imat containing the left endpoint of the interval events. Default: 1.

endcol

A character string or numeric (representing an integer) specifying the column of imat containing the right endpoint of the interval events. Default: 2.

nprof

A numeric acting as an integer specifying the number of copy number profiles from which the events originated. Default: 1.

uthresh

A numeric specifying the upper threshold for the event frequency or (if nprof = 1) for the event count.

dthresh

A numeric specifying the upper and lower thresholds for the event frequency or (if nprof = 1) for the event count.

Value

A matrix of numeric (used as integer) with three columns that represent the masked regions:

  • "chrom", the chromosome number

  • "start", the starting position of a masked region

  • "end", the ending position of a masked region

Author(s)

Alexander Krasnitz, Guoli Sun

Examples


## Load a table of copy number events collected from 1203 profiles.
data(cnpexample)

## Create a table with chromosome 2 only.
del <- cnpexample[cnpexample$chrom == 2,]

## Create a table of deletion events only.
del <- del[del[,"copy.num"] == "del",]

## Create a mask for chromosome 2 using this table, lower threshold of
## 0.008 and upper threshold of 0.02
CNprep:::makeCNPmask.chrom(imat=del, startcol="chrom.start", 
    endcol="chrom.end", nprof=1203, uthresh=0.02, dthresh=0.008)


KrasnitzLab/CNprep documentation built on May 28, 2022, 8:32 p.m.