This function converts three vectors: chr, start, and end to strings of the form {chr}:{start}..{end}.

genomic_range(chr, start, end, starting_position_index = 1L)

Arguments

chr

A character vector of chromosome names.

start

An integer vector of start positions.

end

An integer vector of end positions.

starting_position_index

Use this argument to indicate if the positions are 0-based (0L) or 1-based (1L). This value is used to check if positions are equal or above this number.

Value

Returns a character vector whose strings are genomic ranges of the form {chr}:{start}..{end}.

Examples

genomic_range("1", 10000L, 20000L) # Returns "1:10000..20000"
#> [1] "1:10000..20000"