Learn R Programming

rphast (version 1.0)

read.feat: Read a Feature File (GFF, BED, or GenePred)

Description

Read a features object from a file

Usage

read.feat(filename, pointer.only=FALSE)

Arguments

filename
the name of the file
pointer.only
Whether to store object by reference instead of a data.frame

Value

  • If pointer.only==FALSE, a data.frame with columns corresponding to the GFF specification. Otherwise, an object which is a pointer to an object stored in C.

Details

The function will guess the format of the input file automatically.

See Also

feat for more description of features objects.

msa for more explanation of the pointer.only option.

http://www.sanger.ac.uk/resources/software/gff/spec.html for a detailed description of GFF file format. The columns in features objects mirror the GFF column definitions.

http://genome.ucsc.edu/FAQ/FAQformat for descriptions of BED and GenePred formats.

Examples

Run this code
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
featFile <- "gencode.ENr334.gff"
unzip(exampleArchive, featFile)
f <- read.feat(featFile)
dim(f)
f[1:10,]
unlink(featFile)

Run the code above in your browser using DataLab