Learn R Programming

CNVPanelizer (version 1.2.2)

BedToGenomicRanges: BedToGenomicRanges

Description

It generates a GenomicRanges object from a bed file. Needs to be passed the correct number of the gene name column. If the strings contain more information then just the gene name, a splitting character (split) has to be defined. I.e GeneName1;Amplicon2

Usage

BedToGenomicRanges(panelBedFilepath, ampliconColumn, split, doReduce, rangeExtend, skip)

Arguments

panelBedFilepath
Filepath of the bed file.
ampliconColumn
Number of the column that identifies the gene name in the bed file passed through panelBedFilepath.
split
The character used as separator in the ampliconColumn. It is ";" by default.
doReduce
Should overlapping ranges be merged.
rangeExtend
Should the defined ranges be extended left and right by the given value. Affects the merging of overlapping regions and also read counting.
skip
How many lines should be skipped from the top of the bed file. The function assumes a bed file with column names. Thus default is skip = 1.

Value

A GenomicRanges object containing information about the amplicons described in the bed file.

Examples

Run this code



    bedFilepath <- file.path("someFile.bed")
    ampliconColumn <- 4
    genomicRangesFromBed <- BedToGenomicRanges(bedFilepath, ampliconColumn)

Run the code above in your browser using DataLab