Skip to contents

Helper function ensuring the provided regions are valid.

Usage

sanity_check_regions(incoming_regions = NULL, projection = NULL)

Arguments

incoming_regions

A data frame with regions with the following columns; chrom, start, end.

projection

The projection.

Value

Nothing.

Details

This function checks if the provided start coordinate is equal or greater to the end coordinate for the same chromosome. It also ensures that specified ranges are within the actual chromosomal range.

Examples

#Example 1 - Give the function one region as a string
my_regions = data.frame(chrom = c("chr1", "chr2"), start = c(100, 100), end = c(200, 200))
sanity_check_regions(incoming_regions = my_regions, projection = "hg38")
#> NULL