Skip to contents

Produces a GRangesList out of a GTF file, each element represents the exons of a gene or transcript

Usage

GTF_to_GRangesList(
  gtf,
  gene_or_transcript = c("gene", "transcript"),
  select_strand = c("*", "+", "-"),
  select_chrs = NULL,
  select_ids = NULL
)

Arguments

gtf

path to GTF file

gene_or_transcript

Whether histograms should be computed on gene annotations or transcript annotations. Default gene

select_strand

Select elements belonging to a specific strand. Default *

select_chrs

Select elements on specific chromosomes. Default NULL

select_ids

Select elements by matching ids to genes or transcripts (depending on gene_or_transcript). Default NULL

Value

a GRangesList object where each element is a GRanges object containing the exons of a gene or transcript

Examples

if (FALSE) {
gtf = system.file("extdata", "genes.gtf", package = "HistogramZoo")
gtf_gr = GTF_to_GRangesList(gtf)
}