parseChromLocString: Parse a string containing a chromosome and location on the...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Given a string of the format "chromosome:start-end", pull out the three values contained in the string and return them as a named list

Usage

1
parseChromLocString(chromLocString)

Arguments

chromLocString

A string of the format "chromosome:start-end"

Value

A named list containing the chromosome, start, and end from the supplied string

Examples

1
2
3
4
5
6
7
8
# Note: Both examples return :
# list(chrom="chr10", start=118441047, end=118445892)

# Parse a string containing the "chr" prefix for chromosome
chrom.list <- parseChromLocString("chr10:118441047-118445892")

# Parse a string without the "chr" prefix in the chromosome
chrom.list <- parseChromLocString("10:118441047-118445892")

trena documentation built on Nov. 15, 2020, 2:07 a.m.