Last data update: 2014.03.03

R: Extract simple features from a FeatureDb object
featuresR Documentation

Extract simple features from a FeatureDb object

Description

Generic function to extract genomic features from a FeatureDb object.

Usage

features(x)
## S4 method for signature 'FeatureDb'
features(x)

Arguments

x

A FeatureDb object.

Value

a GRanges object

Author(s)

M. Carlson

See Also

FeatureDb

Examples

  fdb <- loadDb(system.file("extdata", "FeatureDb.sqlite",
                                   package="GenomicFeatures"))
  features(fdb)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GenomicFeatures)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: AnnotationDbi
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/GenomicFeatures/features.Rd_%03d_medium.png", width=480, height=480)
> ### Name: features
> ### Title: Extract simple features from a FeatureDb object
> ### Aliases: features features,FeatureDb-method
> 
> ### ** Examples
> 
>   fdb <- loadDb(system.file("extdata", "FeatureDb.sqlite",
+                                    package="GenomicFeatures"))
>   features(fdb)
GRanges object with 862 ranges and 1 metadata column:
         seqnames               ranges strand |    gieStain
            <Rle>            <IRanges>  <Rle> | <character>
  p36.33     chr1  [      0,  2300000]      * |        gneg
  p36.32     chr1  [2300000,  5300000]      * |      gpos25
  p36.31     chr1  [5300000,  7100000]      * |        gneg
  p36.23     chr1  [7100000,  9200000]      * |      gpos25
  p36.22     chr1  [9200000, 12600000]      * |        gneg
     ...      ...                  ...    ... .         ...
   q13.1    chr22 [35900000, 39300000]      * |        gneg
   q13.2    chr22 [39300000, 42600000]      * |      gpos50
  q13.31    chr22 [42600000, 47000000]      * |        gneg
  q13.32    chr22 [47000000, 48200000]      * |      gpos50
  q13.33    chr22 [48200000, 49691432]      * |        gneg
  -------
  seqinfo: 24 sequences from hg18 genome; no seqlengths
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>