bed2positions: Unwrap a list of genomic intervals into a list of loci...

Description Usage Arguments Value Examples

View source: R/bed2positions.R

Description

Unwrap a list of genomic intervals into a list of loci grouped by chromosome.

Usage

1
bed2positions(targetbed, chrom_to_extract, get_only_chromosomes = FALSE)

Arguments

targetbed

Genomic regions in the BED tab-delimited format.

chrom_to_extract

The chromosome name to extract as i.e. "chr1" or "1" accordingly with BED file annotation

get_only_chromosomes

Set TRUE to return only the list of chromosomes present in the targetbed. default: FALSE

Value

PosByChrom: A list of data.frames (each row is a locus) one for each chromosome present in the targetbed.

chromosomes: A vector listing chromosomes present in the targetbed.

Examples

1
2
3
targetbed <- system.file("extdata", "regions_toy.bed",package = "abemus")
chromosomes <- bed2positions(targetbed = targetbed,chrom_to_extract="8")
targetbp_list <- bed2positions(targetbed = targetbed,get_only_chromosomes = TRUE)

abemus documentation built on Dec. 19, 2019, 1:07 a.m.