Learn R Programming

rphast (version 1.6.9)

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 (can be GFF, BED, GenePred, or wig: rphast will auto-detect)

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
# NOT RUN {
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
featFile <- "gencode.ENr334-100k.gff"
unzip(exampleArchive, featFile)
f <- read.feat(featFile)
dim(f)
f[1:10,]
unlink(featFile)
# }

Run the code above in your browser using DataLab