df2gr: Convert data frame to GRanges

View source: R/bioinfo_sequences.R

df2grR Documentation

Convert data frame to GRanges

Description

Convert a data frame of genomic coordinates to GRanges.

Usage

df2gr(
  x,
  seq = "chr",
  start = "start",
  end = "end",
  strand = NULL,
  si = NULL,
  keep.all.seqlevels = FALSE,
  names2use = "row"
)

Arguments

x

data frame of genomic coordinates

seq

name of the column containing the sequence of the intervals

start

name of the column containing the start of the intervals

end

name of the column containing the end of the intervals

strand

name of the column containing the strand of the intervals

si

output from the "seqinfo" function from the GenomeInfoDb package

keep.all.seqlevels

if TRUE, all sequence levels from si are kept, otherwise, only those present in x

names2use

if NULL, the output will have no names; if "row", it will have the row names of the input (if any); else, it will have the content of the specified column (if it exists)

Value

GRanges

Author(s)

Timothee Flutre


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.