io-gff-read: Read a GFF/GTF/GVT file

Description Usage Arguments Value See Also Examples

Description

This is a lightweight wrapper to the import family of functions defined in rtracklayer.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
read_gff(file, col_names = NULL, genome_info = NULL,
  overlap_ranges = NULL)

read_gff1(file, col_names = NULL, genome_info = NULL,
  overlap_ranges = NULL)

read_gff2(file, col_names = NULL, genome_info = NULL,
  overlap_ranges = NULL)

read_gff3(file, col_names = NULL, genome_info = NULL,
  overlap_ranges = NULL)

Arguments

file

A path to a file or a connection.

col_names

An optional character vector for parsing specific columns in file that are part of the GFF specification. These should name either fixed fields, like source or type, or, for GFF2 and GFF3, any attribute.

genome_info

An optional character string or a Ranges object that contains information about the genome build. For example the UCSC identifier "hg19" will add build information to the returned GRanges.

overlap_ranges

An optional Ranges object. Only the intervals in the file that overlap the Ranges will be returned.

Value

A GRanges object

a GRanges object

See Also

rtracklayer::GFFFile()

Examples

1
2
3
4
5
6
7
8
test_path <- system.file("tests", package = "rtracklayer")
# gff3
test_gff3 <- file.path(test_path, "genes.gff3")
gr <- read_gff3(test_gff3)
gr
# alternatively with read_gff
gr <- read_gff(test_gff3, genome_info = "hg19")
gr

plyranges documentation built on Nov. 1, 2018, 3:58 a.m.