Title: | doseR |
---|---|
Description: | doseR package is a next generation sequencing package for sex chromosome dosage compensation which can be applied broadly to detect shifts in gene expression among an arbitrary number of pre-defined groups of loci. doseR is a differential gene expression package for count data, that detects directional shifts in expression for multiple, specific subsets of genes, broad utility in systems biology research. doseR has been prepared to manage the nature of the data and the desired set of inferences. doseR uses S4 classes to store count data from sequencing experiment. It contains functions to normalize and filter count data, as well as to plot and calculate statistics of count data. It contains a framework for linear modeling of count data. The package has been tested using real and simulated data. |
Authors: | AJ Vaestermark, JR Walters. |
Maintainer: | ake.vastermark <[email protected]> |
License: | GPL |
Version: | 1.23.0 |
Built: | 2024-12-18 03:24:12 UTC |
Source: | https://github.com/bioc/doseR |
This function filters the expression using DAFS (see ref). This is a core function invoked by the DAFS wrapper.
dafs(VEC1, PLOT)
dafs(VEC1, PLOT)
VEC1 |
Vector 1, not intended for user interaction. |
PLOT |
Boolean, toggles plotting. |
This function filters the expression, using Data Adaptive Flag method.
Returns vx[which.min(vv)] to wrapper function.
AJ Vaestermark, JR Walters.
BMC Bioinformatics, 2014, 15:92
library(mclust) data(hmel.se) f_se <- dafsFilter(se)
library(mclust) data(hmel.se) f_se <- dafsFilter(se)
This function filters the expression of the supplied object, by invoking the dafsFilter (dafs) function. dafsFilter is a filtering function used to remove rows (genes) of various expression data.
dafsFilter(se, PLOT=TRUE)
dafsFilter(se, PLOT=TRUE)
se |
A SummarizedExperiment object. |
PLOT |
Boolean, toggles plotting. |
This function filters the expression of the supplied object using a Data Adaptive Flag filter. The internal function uses a vector to store Kolmogorov Smirnov distance statistics, loops through cuts of the data to determine targeted K-S statistic, selects data greater than a quantile and runs Mclust on that data to determine theoretical distribution. The wrapper uses simpleFilter to determine first left-most local minima (using the Earth library).
Returns an invisible, filtered SummExp object.
AJ Vaestermark, JR Walters.
BMC Bioinformatics, 2014, 15:92
library(mclust) data(hmel.se) f_se <- dafsFilter(se)
library(mclust) data(hmel.se) f_se <- dafsFilter(se)
generateStats is a summary function used on various expression data.
generateStats(se, groupings= NULL, mode_mean=TRUE, LOG2=TRUE)
generateStats(se, groupings= NULL, mode_mean=TRUE, LOG2=TRUE)
se |
A SummarizedExperiment object. |
groupings |
A grouping (annotation column), e.g. groupings="something". |
mode_mean |
Boolean, Calculate RowMeans or RowMedians. |
LOG2 |
Boolean, Calculate LOG2. |
This function completes summary statistics of the expression of the supplied s.e. object.
Returns an invisible list of summary statistics, kruskal test and raw data of an s.e. object.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) generateStats(se, groupings="annotation.ZA")
data(hmel.se) generateStats(se, groupings="annotation.ZA")
getLibsizes3 method for SummarizedExp class object, derived from getLibsizes2
getLibsizes3(se, subset = NULL, estimationType = c("quantile", "total", "edgeR"),quantile = 0.75, ...)
getLibsizes3(se, subset = NULL, estimationType = c("quantile", "total", "edgeR"),quantile = 0.75, ...)
se |
A SummarizedExperiment object. |
subset |
Value |
estimationType |
e.g. quantile, total, edgeR. |
quantile |
A quantile, expressed as e.g. 0.75. |
... |
Passthrough arguments. |
Libsize value
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) getLibsizes3(se)
data(hmel.se) getLibsizes3(se)
This function is an LME4 wrapper for dosage analysis.
glSeq(dm, model, ...)
glSeq(dm, model, ...)
dm |
The dm data. Generally a reformatted object from se.DM. |
model |
The model. Expressed using standard LME4 syntax, see vignette. |
... |
passthrough arguments. |
This function is an lme4 wrapper.
Returns LME4 output.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) f_se <- quantFilter(se, lo.bound = 0.4, hi.bound = 0.5) dm <- se.DM(f_se) glSeq(dm, "-1 + replicate")
data(hmel.se) f_se <- quantFilter(se, lo.bound = 0.4, hi.bound = 0.5) dm <- se.DM(f_se) glSeq(dm, "-1 + replicate")
Hmel data set
data("hmel.data.doser")
data("hmel.data.doser")
An object of class list
of length 3.
To demonstrate a typical workflow using doseR, we will use data from a study in Heliconius butterflies. H. melpomene has 20 autosomes with chromosome 21 being the "Z" sex chromosome. Like all Lepidoptera, this is a female-heterogametic species, so males are diploid for the Z while females have a single Z and W chromosomes. The relevant data are included in the doseR package, which must be installed. These test data are unpublished.
This function filters the expression of the supplied se object. iqrxFilter is a filtering function used to remove rows (genes) of various expression data.
iqrxFilter(se, iqr_multi = 1.5, MEDIAN = FALSE, na.rm = TRUE)
iqrxFilter(se, iqr_multi = 1.5, MEDIAN = FALSE, na.rm = TRUE)
se |
A SummarizedExperiment object. |
iqr_multi |
Numeric multiplier; removes any outliers that are iqr_multi times the mid-50 percentile distance greater or less than the 25th and 75th percentiles, by default |
MEDIAN |
Boolean, Calculate RowMeans or RowMedians. |
na.rm |
Boolean, NA removal. |
This function filters the expression of the supplied object, based on a selected percentage cutoff and selected interquartile range multiplier. The function iqrxFilter will: 1) log-base two transform all RPKM values (obligatory); (2) remove any outliers that were 1.5 times the mid-50 percentile distance greater or less than the 75th and 25th percentiles (by default), respectively; and (3) uses mean values and instead of median values (by default).
Returns a filtered SummarizedExperiment object.
AJ Vaestermark, JR Walters.
Jue et al. BMC Genomics 2013 14:150
data(hmel.se) f_se <- iqrxFilter(se)
data(hmel.se) f_se <- iqrxFilter(se)
make_RPKM populates RPKM slot of SummarizedExperiment S4 object.
make_RPKM(se)
make_RPKM(se)
se |
A SummarizedExperiment object. |
RPKM populated object
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) SummarizedExperiment::assays(se)$rpkm <- make_RPKM(se)
data(hmel.se) SummarizedExperiment::assays(se)$rpkm <- make_RPKM(se)
This function generates a boxplot of FPKM expression values from the supplied object. FPKM values are averaged across replicates and partitioned among groups of loci as specified in a selected column from the annotation slot of the provided object.
plotExpr(se, groupings= NULL, mode_mean=TRUE, treatment=levels(colData(se)$Treatment), LOG2=TRUE, clusterby_grouping=TRUE, ...)
plotExpr(se, groupings= NULL, mode_mean=TRUE, treatment=levels(colData(se)$Treatment), LOG2=TRUE, clusterby_grouping=TRUE, ...)
se |
A SummarizedExp object containing FPKM values and at least one annotation column. |
groupings |
Specifies which column in the dataframe of the annotation slot that will be used to group loci in the boxplot. Can provide either a character value matching the column name, or a single numerical value used as an index of dataframe columns. |
mode_mean |
Logical. If TRUE then FPKM values are averaged by mean across replicates within treatment. If FALSE, values are averaged by median. |
treatment |
A character vector indicating which treatments (i.e. levels in the replicates slot vector) will be plotted. Order matters, and controls the ordering of treatments represented in the boxplot. |
LOG2 |
Logical. If TRUE then average FPKM values are Log2 transformed. |
clusterby_grouping |
Logical. If TRUE then boxplots are arranged by locus annotation grouping. If FALSE they are arranged by treatment levels, as indicated in the treatment argument. |
... |
Additional named arguments and graphical parameters passed to the boxplot function. |
This function generates boxplots to visualize the distribution of FPKM expression values provided in an object, arranged by selected treatments and locus annotations. FPKM values are averaged (mean or median) within selected treatments, to provide a single expression value per locus per treatment. Loci are partitioned into groupings based on a specified column in the dataframe of annotations slot of the object. Thus a box is drawn for each grouping of loci for each treatment indicated. Desired treatments and their ordering are specified by the treatment argument. Groupings are arranged by sort order of the annotation column indicated, and can thus be controlled by providing a factor with a pre-specified level order. By default (clusterby_grouping = TRUE), boxes are arranged by annotation group first, and then by treatment, but setting this option to FALSE arranges boxes by treatment and then annotation group. This function uses the base graphics boxplot function to generate the plot, so can accept all relevant graphical arguments for customizing the figure; see boxplot for details.
Returns an invisible data frame containing values and labels used to generate the figure.
AJ Vaestermark, JR Walters.
The 'doseR' package, 2018 (in press).
data(hmel.se) plotExpr(se, groupings = "annotation.ZA", treatment = 'Male' )
data(hmel.se) plotExpr(se, groupings = "annotation.ZA", treatment = 'Male' )
This function generates MA plot.
plotMA.se(se, samplesA, samplesB, scale = NULL, xlab = 'A', ylab = 'M', ...)
plotMA.se(se, samplesA, samplesB, scale = NULL, xlab = 'A', ylab = 'M', ...)
se |
A SummarizedExperiment object. |
samplesA |
Either a character vector, identifying sample set A by either replicate name or sample name, or a numerical vector giving the columns of data in the object that forms sample set A. |
samplesB |
Either a character vector, identifying sample set B by either replicate name or sample name, or a numerical vector giving the columns of data in the object that forms sample set B. |
scale |
If given, defines the scale on which the log-ratios will be plotted. |
xlab |
Label for the X-axis. Defaults to 'A'. |
ylab |
Label for the Y-axis. Defaults to 'M'. |
... |
Any other parameters to be passed to the plot function. |
This function makes MA plot from SummExperiment object.
Returns MA plot.
AJ Vaestermark, JR Walters.
The 'doseR' package, 2018 (in press).
data(hmel.se) plotMA.se(se, samplesA = 'Male', samplesB = 'Female')
data(hmel.se) plotMA.se(se, samplesA = 'Male', samplesB = 'Female')
This function plots the expression of the supplied object, representing ratios between a pair of selected treatments as a boxplot for each group in the selected annotation column.
plotRatioBoxes(se, groupings= NULL, treatment1=NULL, treatment2=NULL, mode_mean=TRUE, LOG2=TRUE, ...)
plotRatioBoxes(se, groupings= NULL, treatment1=NULL, treatment2=NULL, mode_mean=TRUE, LOG2=TRUE, ...)
se |
A SummarizedExperiment object. |
groupings |
A grouping (annotation column), e.g. groupings="something". |
treatment1 |
Symbol, treatment 1. |
treatment2 |
Symbol, treatment 2. |
mode_mean |
Boolean, Calculate RowMeans or RowMedians. |
LOG2 |
Boolean, Calculate LOG2. |
... |
Passthrough arguments to boxplot (additional arguments affecting the summary produced). |
This function boxplots expression of the supplied object using ratios of treatment1/treatment2.
Returns an invisible data frame containing the values.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) plotRatioBoxes(se, groupings='annotation.ZA', treatment1 = 'Male', treatment2 = 'Female')
data(hmel.se) plotRatioBoxes(se, groupings='annotation.ZA', treatment1 = 'Male', treatment2 = 'Female')
This function plots the expression of the supplied object, using ratios between a pair of selected treatments.
plotRatioDensity(se, groupings= NULL, treatment1=NULL, treatment2=NULL, mode_mean=TRUE, LOG2=TRUE,...)
plotRatioDensity(se, groupings= NULL, treatment1=NULL, treatment2=NULL, mode_mean=TRUE, LOG2=TRUE,...)
se |
A SummarizedExperiment object. |
groupings |
A grouping (annotation); groupings="annotation.ZA" |
treatment1 |
Symbol, treatment 1. |
treatment2 |
Symbol, treatment 2. |
mode_mean |
Boolean, Calculate RowMeans or RowMedians. |
LOG2 |
Boolean, Calculate LOG2. |
... |
Passthrough arguments to boxplot (additional arguments affecting the summary produced). |
This function plots expression of the supplied object using ratios of treatment1/treatment2.
Returns an invisible data frame containing the x-values and corresponding density for each applicable annotation column entry.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) plotRatioDensity(se, groupings='annotation.ZA', treatment1 = 'Male', treatment2 = 'Female',lty=1,type="l")
data(hmel.se) plotRatioDensity(se, groupings='annotation.ZA', treatment1 = 'Male', treatment2 = 'Female',lty=1,type="l")
This function filters the expression of the supplied object; quantFilter is a filtering function used to remove rows (genes) of various expression data.
quantFilter (se, lo.bound=.25, hi.bound=.75, MEDIAN = FALSE, na.rm = TRUE)
quantFilter (se, lo.bound=.25, hi.bound=.75, MEDIAN = FALSE, na.rm = TRUE)
se |
A SummarizedExperiment object. |
lo.bound |
The lower cutoff, expressed as a percentage. |
hi.bound |
The upper cutoff, expressed as a percentage. |
MEDIAN |
Boolean, Calculate RowMeans or RowMedians. |
na.rm |
Boolean, NA removal. |
This function filters the expression of the supplied object, based on a selected percentage cutoff.
Returns a filtered SummarizedExperiment object.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) f_se <- quantFilter(se, lo.bound=0.5)
data(hmel.se) f_se <- quantFilter(se, lo.bound=0.5)
Hmel data set
data("hmel.se")
data("hmel.se")
An object of class SummarizedExperiment
with 13619 rows and 6 columns.
To demonstrate a typical workflow using doseR, we will use data from a study in Heliconius butterflies. H. melpomene has 20 autosomes with chromosome 21 being the "Z" sex chromosome. Like all Lepidoptera, this is a female-heterogametic species, so males are diploid for the Z while females have a single Z and W chromosomes. The relevant data are included in the doseR package, which must be installed. These test data are unpublished. This is the SummarizedExperiment version of the sample data.
This function generates LME4 input.
se.DM(se, weightByLL = TRUE)
se.DM(se, weightByLL = TRUE)
se |
A SummarizedExperiment object containing FPKM values and at least one annotation column. |
weightByLL |
Logical, weigh by log likelihood score. |
This function converts SummarizedExperiment object.
Returns LME4 input.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) f_se <- quantFilter(se, lo.bound = 0.4, hi.bound = 0.5) dm <- se.DM(f_se)
data(hmel.se) f_se <- quantFilter(se, lo.bound = 0.4, hi.bound = 0.5) dm <- se.DM(f_se)
simpleFilter is a filtering function used to remove rows (genes) of various expression data.
simpleFilter(se, mean_cutoff=NULL, min_cutoff=NULL, median_cutoff= NULL, counts=TRUE)
simpleFilter(se, mean_cutoff=NULL, min_cutoff=NULL, median_cutoff= NULL, counts=TRUE)
se |
A SummarizedExperiment object. |
mean_cutoff |
The lower cutoff, using mean. |
min_cutoff |
The cutoff, expressed as a minimum acceptable value. |
median_cutoff |
The cutoff, using a median value. |
counts |
Boolean, use raw counts data (default) or RPKM. |
This function filters the expression of the supplied obj.
Returns a filtered SummarizedExperiment object.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) ; f_se <- simpleFilter(se, mean_cutoff=0.5)
data(hmel.se) ; f_se <- simpleFilter(se, mean_cutoff=0.5)
generateStats is a summary function used on various expression data, using ratios between selected treatments.
test_diffs(se, groupings= NULL, treatment1=NULL, treatment2=NULL, mode_mean=TRUE, LOG2=TRUE)
test_diffs(se, groupings= NULL, treatment1=NULL, treatment2=NULL, mode_mean=TRUE, LOG2=TRUE)
se |
A SummarizedExperiment object. |
groupings |
A grouping (annotation column); groupings="annotation.ZA". |
treatment1 |
Symbol, treatment 1. |
treatment2 |
Symbol, treatment 2. |
mode_mean |
Boolean, Calculate RowMeans or RowMedians. |
LOG2 |
Boolean, Calculate LOG2. |
This function completes summary statistics of the expression of the supplied SummarizedExperiment object.
Returns an invisible list of summary statistics, kruskal test and raw data of an object, using ratios between selected treatments.
AJ Vaestermark, JR Walters.
The "doseR" package, 2018 (in press).
data(hmel.se) test_diffs(se, groupings='annotation.ZA',treatment1="Male", treatment2="Female" )
data(hmel.se) test_diffs(se, groupings='annotation.ZA',treatment1="Male", treatment2="Female" )