readAnnotation | R Documentation |
readAnnotation
reads and parses content of GFF/GTF files
and stores annotated genomic features (regions) in a GRanges
object.
readAnnotation(fileName, feature = NULL, source = NULL, tagName = NULL)
fileName |
A path, URL or connection to the GFF/GTF annotation
file. Compressed files ( |
feature |
|
source |
|
tagName |
|
feature
and source
can be NULL
. In this case, no
selection is performed and all content into the file is imported.
If tagName
is NULL
, then a systematic name
(annot.N
) is given to elements of the GRanges
object.
A GRanges
object with annotated regions information.
GFFFile-class
##----------------------------------------------------------------------- ## Extraction of miRNAs using an GTF annotation file ##----------------------------------------------------------------------- basedir <- system.file("extdata", package="srnadiff", mustWork = TRUE) gtfFile <- file.path(basedir, "Homo_sapiens.GRCh38.76.gtf.gz") annotReg <- readAnnotation(gtfFile, feature="gene", source="miRNA") annotReg ##----------------------------------------------------------------------- ## Extraction of mature miRNAs using a miRBase-formatted file ##----------------------------------------------------------------------- basedir <- system.file("extdata", package="srnadiff", mustWork = TRUE) gffFile <- file.path(basedir, "mirbase21_GRCh38.gff3") annotReg <- readAnnotation(gffFile, feature="miRNA", tagName="miRNA") annotReg ##----------------------------------------------------------------------- ## Extraction of precursor miRNAs using a miRBase-formatted file ##----------------------------------------------------------------------- basedir <- system.file("extdata", package="srnadiff", mustWork = TRUE) gffFile <- file.path(basedir, "mirbase21_GRCh38.gff3") annotReg <- readAnnotation(gffFile, feature="miRNA_primary_transcript") annotReg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.