underscored_pos_to_GRanges {CNVScope}R Documentation

Convert coordinates in underscored format to a GRanges object.

Description

This function creates a new GRanges object from a character vector of coordinates in the form "chr1_0_5000" and creates a GRanges object from them.

Usage

underscored_pos_to_GRanges(
  underscored_positions = NULL,
  extended_data = NULL,
  zeroToOneBasedStart = T,
  zeroToOneBasedEnd = F
)

Arguments

underscored_positions

A vector of positions of the form c("chr1_0_5000","chr1_7500_10000","chr1_10000_15000")

extended_data

Optional metadata columns. These columns cannot be named "start", "end", "width", or "element". Passed to GRanges object as ...

zeroToOneBasedStart

Converts a set of underscored positions that begin with zero to GRanges where the lowest positional value on a chromosome is 1. Essentially adds 1 to start

zeroToOneBasedEnd

Adds 1 to the end of the underscored positions

Value

A GRanges object

Examples

load(system.file("extdata","nbl_result_matrix_sign_small.rda",package = "CNVScope"))
underscored_pos_to_GRanges(colnames(nbl_result_matrix_sign_small))

[Package CNVScope version 3.7.2 Index]