read_gtf: Import a GTF as tibble

View source: R/genomics_files_utils.R

read_gtfR Documentation

Import a GTF as tibble

Description

Import a genomics GTF file and offer different way to handle the last 9th column (with a bunch of extra info).

Usage

read_gtf(path, max_rows = 10000, col_attribute_type = "character", ...)

Arguments

max_rows

The maximum rows to import. Helps avoiding memory issues. Default 10000.

col_attribute_type

Specify how to handle the last column of a GTF file. See details. #'

  • character - Default. Basically do nothing.

  • list - Convert the column to a list

  • split - Split the column into different separate columns

...

Additional parameters to pass to read_delim()

A

valid path to a GTF file.

Details

The parameter col_attribute_type can be either: "character", "list", or "split". The first option (character) imports the data as is. The option list coerce the column into a list column in the data frame. The last option split divides all the attributes into separate columns with a header.

Value

A GTF file as a tibble

Examples

hg38gtf <- read_gtf(path = hg38_gtf_path)

Ni-Ar/niar documentation built on Feb. 3, 2025, 9:25 a.m.