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

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

# 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")