labelSeg: Helper functions for plotting

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Helper functions for plotting and working with chromosomes and segmentations

Usage

1
2
3
labelSeg(chr, start, end, pctOv = 0.1)
numChromosome(chr)
divideGenome(size=10)

Arguments

chr

chromosome

start

start position of segment

end

end position of segment

pctOv

required amount of percent overlap needed in order to report

size

Size, in MB, of the desired equally spaced divisions of the genome

Details

labelSeg creates labels ‘p’, ‘q’, and ‘pq’ for segmentations based on the overlap of the segment with the p/q portions of the human chromosome (hg19). It uses the data stored in hg19chromosomes with the package (under the directory 'extdata', not as a dataset of the package). Uses the findOverlaps function of GenomicRanges.

numChromosome takes character valued chromosome labels (“1”,“2”,...,“X”,“Y”) and converts them into values 1:23. This is useful for sorting chromosome values, for example.

divideGenome makes segments of the genome of size equal to 'size' times 1e6, i.e. size-MB length intervals, also based on the hg19chromosomes data described above.

Value

vector of numerical values between 1:23

Author(s)

Elizabeth Purdom

See Also

hg19chromosomes,findOverlaps

Examples

1
2
3
4
5
6
7
8
9
data(mutData)
segData<-data.frame(chromosome="17",start=c(0,1.8e7+1),
    end=c(1.8e7,max(mutData$position)),totalCpy=c(2,NA),
    markRegion=c(FALSE,TRUE))
if(require(GenomicRanges)) labelSeg(chr=segData$chromosome,
    start=segData$start,end=segData$end)
chr<-c("1","4","10","23","X")
chr[order(chr)]
chr[order(numChromosome(chr))]

epurdom/cancerTiming documentation built on May 16, 2019, 8:21 a.m.