gff2irange: Extract annotation information from a gff file into an irange...

View source: R/annotation_gff.R

gff2irangeR Documentation

Extract annotation information from a gff file into an irange object.

Description

Try to make import.gff a little more robust; I acquire (hopefully) valid gff files from various sources: yeastgenome.org, microbesonline, tritrypdb, ucsc, ncbi. To my eyes, they all look like reasonably good gff3 files, but some of them must be loaded with import.gff2, import.gff3, etc. That is super annoying. Also, I pretty much always just do as.data.frame() when I get something valid from rtracklayer, so this does that for me, I have another function which returns the iranges etc. This function wraps import.gff/import.gff3/import.gff2 calls in try() because sometimes those functions fail in unpredictable ways.

Usage

gff2irange(gff, type = NULL)

Arguments

gff

Gff filename.

type

Subset to extract.

Details

This is essentially load_gff_annotations(), but returns data suitable for getSet() This is another place which should be revisited for improvements via mcols(). Check snp.r. for ideas.

Value

Iranges! (useful for getSeq().)

See Also

[rtracklayer] [load_gff_annotations()] import.gff

Examples

 example_gff <- system.file("share", "gas.gff", package = "hpgldata")
 gas_iranges <- gff2irange(example_gff)
 colnames(as.data.frame(gas_iranges))

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.