Detect the appropriate class for genomic strings
Source:R/GenomicCoordinates.R
detect_genomic_class.RdUtility function to determine what class a genomic string should be parsed as, without actually performing the parsing.
Examples
detect_genomic_class("chr1:1000-2000")
#> [1] "GRanges"
detect_genomic_class("chr1:1000")
#> [1] "GPos"
detect_genomic_class(c("chr1:1-10|chr2:20-30", "1000-2000"))
#> [1] "GInteractions" "IRanges"