genomic_range: Create genomic range strings

View source: R/genomic_range.R

genomic_rangeR Documentation

Create genomic range strings

Description

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

Usage

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"


ramiromagno/ensemblr documentation built on Sept. 5, 2024, 9:22 a.m.