View source: R/annotation_gff.R
gff2irange | R Documentation |
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.
gff2irange(gff, type = NULL)
gff |
Gff filename. |
type |
Subset to extract. |
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.
Iranges! (useful for getSeq().)
[rtracklayer] [load_gff_annotations()]
import.gff
example_gff <- system.file("share", "gas.gff", package = "hpgldata")
gas_iranges <- gff2irange(example_gff)
colnames(as.data.frame(gas_iranges))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.