Last data update: 2014.03.03

R: Plot frequency of expression against mean expression level
plotExprsFreqVsMeanR Documentation

Plot frequency of expression against mean expression level

Description

Plot frequency of expression against mean expression level

Usage

plotExprsFreqVsMean(object, feature_set = NULL, feature_controls = NULL,
  shape = 1, alpha = 0.7, ...)

Arguments

object

an SCESet object.

feature_set

character, numeric or logical vector indicating a set of features to plot. If character, entries must all be in featureNames(object). If numeric, values are taken to be indices for features. If logical, vector is used to index features and should have length equal to nrow(object). If NULL, then the function checks if feature controls are defined. If so, then only feature controls are plotted, if not, then all features are plotted.

feature_controls

character, numeric or logical vector indicating a set of features to be used as feature controls for computing technical dropout effects. If character, entries must all be in featureNames(object). If numeric, values are taken to be indices for features. If logical, vector is used to index features and should have length equal to nrow(object). If NULL, then the function checks if feature controls are defined. If so, then these feature controls are used.

shape

(optional) numeric scalar to define the plotting shape.

alpha

(optional) numeric scalar (in the interval 0 to 1) to define the alpha level (transparency) of plotted points.

...

further arguments passed to plotMetadata (should only be size, if anythin).

Details

This function plots gene expression frequency versus mean expression level, which can be useful to assess the effects of technical dropout in the dataset. We fit a non-linear least squares curve for the relationship between expression frequency and mean expression and use this to define the number of genes above high technical dropout and the numbers of genes that are expressed in at least 50 of genes to be treated as feature controls can be specified, otherwise any feature controls previously defined are used.

Value

a ggplot plot object

Examples

data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data=sc_example_cell_info)
rownames(pd) <- pd$Cell
ex_sceset <- newSCESet(countData=sc_example_counts, phenoData=pd)
ex_sceset <- calculateQCMetrics(ex_sceset)
plotExprsFreqVsMean(ex_sceset)

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(scater)
Loading required package: Biobase
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

Welcome to Bioconductor

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

Loading required package: ggplot2

Attaching package: 'scater'

The following object is masked from 'package:stats':

    filter

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/scater/plotExprsFreqVsMean.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotExprsFreqVsMean
> ### Title: Plot frequency of expression against mean expression level
> ### Aliases: plotExprsFreqVsMean
> 
> ### ** Examples
> 
> data("sc_example_counts")
> data("sc_example_cell_info")
> pd <- new("AnnotatedDataFrame", data=sc_example_cell_info)
> rownames(pd) <- pd$Cell
> ex_sceset <- newSCESet(countData=sc_example_counts, phenoData=pd)
> ex_sceset <- calculateQCMetrics(ex_sceset)
> plotExprsFreqVsMean(ex_sceset)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>