makeCNPmask {CNprep}  R Documentation 
The function takes as an input a set of intervals with integervalued 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.
makeCNPmask(imat,chromcol=1,startcol=2,endcol=3,nprof=1,uthresh,dthresh)
imat 
A matrix or a data frame tabulating the chromosome number and endpoint positions of the interval events. 
chromcol , startcol , endcol 
Character strings or integers specifying the columns of

nprof 
An integer specifying the number of copy number profiles from which the events originate. 
uthresh , dthresh 
Numeric, specifying the upper and lower thresholds for the event frequency or
(if 
An integer matrix with three columns, called "chrom","start" and "end", specifying the chromosome number and boundary positions of the mask.
Alex Krasnitz, Guoli Sun
#load a table of copy number events collected from 1203 profiles.
data(cnpexample)
#Create a table of gain (amplification) events only.
amps<cnpexample[cnpexample[,"copy.num"]=="amp",]
#Create a mask using this table.
ampCNPmask<makeCNPmask(imat=amps,chromcol="chrom",startcol="chrom.start",
endcol="chrom.end",nprof=1203,uthresh=0.02,dthresh=0.008)