mut2Seg {cancerTiming}R Documentation

Align mutations to segments

Description

A function to match mutations into the segments that include them.

Usage

mut2Seg(mutData, segData, verbose = TRUE)

Arguments

mutData

matrix or data.frame. Column names must include ‘chr’ and ‘position’

segData

matrix or data.frame. Column names must include ‘chr’,‘start’,and ‘end’ (in any order)

verbose

logical. If TRUE gives information about the progress and possible problems (e.g. if different chromosome names in the two sets )

Details

This function finds which segments in the segData file contain the mutations and returns a data.frame with the concatenation of the mutation information and the segments information. The function relies on findOverlaps in the GenomicRanges package in bioconductor.

Value

Data frame with concatenated values.

Author(s)

Elizabeth Purdom

See Also

findOverlaps

Examples

if(require(GenomicRanges) & require(IRanges)){
	data(mutData)
	colnames(mutData)[1]<-c("chr")
	segs<-data.frame(chr=c(17,17),start=c(1,1.8e7+100),end=c(1.8e7,81195210),
		normCont=0.22,segId=c("CNLOH","Other"))
	##Trivial segmentation annotation for example
	mutId<-mut2Seg(mutData,segs)
	head(mutId)	
}


[Package cancerTiming version 3.1.8 Index]