Skip to content

Commit a644da3

Browse files
author
Tallulah Andrews
committed
tidy up
1 parent 18f9a86 commit a644da3

11 files changed

+43
-43
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: M3D
1+
Package: M3Drop
22
Version: 1.0
33
Date: 2016-02-10
44
Title: Michaelis-Menten Modelling of Dropouts

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
exportPattern("bg__*")
2-
exportPattern("M3D_*")
2+
exportPattern("M3Drop_*")
33
export(Brennecke_getVariableGenes)
44
import(RColorBrewer)
55
import(gplots)

man/M3D_Clean_Data.Rd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
\name{M3D_Clean_Data}
2-
\alias{M3D_Clean_Data}
1+
\name{M3Drop_Clean_Data}
2+
\alias{M3Drop_Clean_Data}
33
\alias{bg__filter_cells}
44
\title{Filter Expression Data}
55
\description{
66
Filters and normalizes a given expression matrix. Removes low quality cells and undetected genes, and normalizes counts to counts per million.
77
}
88
\usage{
9-
M3D_Clean_Data(expr_mat, labels = NA, is.counts = TRUE, suppress.plot = FALSE, pseudo_genes = NA, min_detected_genes = NA)
9+
M3Drop_Clean_Data(expr_mat, labels = NA, is.counts = TRUE, suppress.plot = FALSE, pseudo_genes = NA, min_detected_genes = NA)
1010
bg__filter_cells(expr_mat, labels = NA, suppress.plot = FALSE, min_detected_genes = NA)
1111
}
1212
\arguments{
@@ -21,7 +21,7 @@
2121
\value{list with elements: data, the normalized filtered expression matrix; and labels, labels of the remaining cells.}
2222
\examples{
2323
library(M3DExampleData)
24-
cpm = M3D_Clean_Data(Mmus_example_list$data, Mmus_example_list$labels, is.counts=TRUE, min_detected_genes=2000) # Remove all cells with < 2000 detected genes and convert to cpm
25-
filtered_only = M3D_Clean_Data(Mmus_example_list$data, Mmus_example_list$labels, is.counts=FALSE) # Removes cells with significantly few detected genes (FDR=5%)
24+
cpm = M3Drop_Clean_Data(Mmus_example_list$data, Mmus_example_list$labels, is.counts=TRUE, min_detected_genes=2000) # Remove all cells with < 2000 detected genes and convert to cpm
25+
filtered_only = M3Drop_Clean_Data(Mmus_example_list$data, Mmus_example_list$labels, is.counts=FALSE) # Removes cells with significantly few detected genes (FDR=5%)
2626
}
2727
\keyword{normalization, quality control}

man/M3D_Differential_Expression.Rd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
\name{M3D_Differential_Expression}
2-
\alias{M3D_Differential_Expression}
1+
\name{M3Drop_Differential_Expression}
2+
\alias{M3Drop_Differential_Expression}
33
\alias{bg__test_DE_K_equiv}
44
\title{Differentially Expressed Genes.}
55
\description{
66
Use Michaelis-Menten curve to find differentially expressed (DE) genes.
77
}
88
\usage{
9-
M3D_Differential_Expression(expr_mat, mt_method="bon", mt_threshold=0.05, suppress.plot=FALSE)
9+
M3Drop_Differential_Expression(expr_mat, mt_method="bon", mt_threshold=0.05, suppress.plot=FALSE)
1010
bg__test_DE_K_equiv(expr_mat, fit=NA)
1111
}
1212
\arguments{
@@ -18,13 +18,13 @@
1818
}
1919
\details{Fits a Michaelis-Menten function to the dropout-rate (if not provided) of the provided expression matrix. Identifies genes where the gene-specific K calculated as (S = mean expression, P = dropout rate): \deqn{K=\frac{S*P}{1-P}}{K = (S * P)/(1 - P)} is significantly larger than the K fitted to the entire dataset. Combines standard errors of the fitted K, the gene-specific dropout rate and the gene-specific average expression using error propagation rules. Determines the signficance of the gene-specific K using a Z-test with the propagated error then applies the specified multiple testing correction to identify DE genes. Plots the dropout rate vs gene expression with the fitted MM curve and highlights in purple the significantly DE genes.}
2020
\value{
21-
\code{M3D_Differential Expression} : a data.frame of significantly differentially expressed genes with columns: Gene, p.value, q.value
21+
\code{M3Drop_Differential Expression} : a data.frame of significantly differentially expressed genes with columns: Gene, p.value, q.value
2222
\code{bg__test_DE_K_equiv} : named list of raw p-values (pval) and relative K size (fold_change) for all genes.
2323
}
2424
\examples{
2525
library(M3DExampleData)
26-
DE_genes = M3D_Differential_Expression(Mmus_example_list$data, suppress.plot=TRUE)
27-
DE_genes = M3D_Differential_Expression(Mmus_example_list$data)
26+
DE_genes = M3Drop_Differential_Expression(Mmus_example_list$data, suppress.plot=TRUE)
27+
DE_genes = M3Drop_Differential_Expression(Mmus_example_list$data)
2828
DE_test_results = bg__test_DE_K_equiv(Mmus_example_list$data);
2929
}
3030
\seealso{

man/M3D_Dropout_Models.Rd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
\name{M3D_Dropout_Models}
2-
\alias{M3D_Dropout_Models}
1+
\name{M3Drop_Dropout_Models}
2+
\alias{M3Drop_Dropout_Models}
33
\title{Fit functions to the dropouts vs expression distribution.}
44
\description{
55
Fits the modified Michaelis-Menten equation (MM), a logistic regession (logistic), or a double exponential (ZIFA) function to the relationship between mean expression and dropout-rate (proportion of zero values).
66
}
7-
\usage{M3D_Dropout_Models(expr_mat, xlim=NA, suppress.plot=FALSE)}
7+
\usage{M3Drop_Dropout_Models(expr_mat, xlim=NA, suppress.plot=FALSE)}
88
\arguments{
99
\item{expr_mat}{a numeric matrix of expression values, columns = samples, rows = genes.}
1010
\item{xlim}{limits for x-axis of plot.}
@@ -18,7 +18,7 @@
1818
\value{Invisibly, a list of output from each fit (MMfit, LogiFit, ExpoFit).}
1919
\examples{
2020
library(M3DExampleData)
21-
M3D_Dropout_Models(Mmus_example_list$data)
21+
M3Drop_Dropout_Models(Mmus_example_list$data)
2222
}
2323

2424
\seealso{

man/M3D_Expression_Heatmap.Rd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
\name{M3D_Expression_Heatmap}
2-
\alias{M3D_Expression_Heatmap}
1+
\name{M3Drop_Expression_Heatmap}
2+
\alias{M3Drop_Expression_Heatmap}
33
\alias{bg__expression_heatmap}
44
\title{Plot Heatmap of Gene Expression}
55
\description{
66
Plots a customized heatmap of scaled log expression values.
77
}
88
\usage{
9-
M3D_Expression_Heatmap(genes, expr_mat, cell_labels=NA, interesting_genes=NA, key_genes=genes, key_cells=NA)
9+
M3Drop_Expression_Heatmap(genes, expr_mat, cell_labels=NA, interesting_genes=NA, key_genes=genes, key_cells=NA)
1010
bg__expression_heatmap(genes, expr_mat, cell_labels=NA, gene_labels=NA, key_genes=genes, key_cells=NA)
1111
}
1212
\arguments{
@@ -22,6 +22,6 @@
2222
\value{Invisibly, output from heatmap.2 call.}
2323
\examples{
2424
library(M3DExampleData)
25-
M3D_Expression_Heatmap(head(rownames(Mmus_example_list$data),20),Mmus_example_list$data, cell_labels = Mmus_example_list$labels)
25+
M3Drop_Expression_Heatmap(head(rownames(Mmus_example_list$data),20),Mmus_example_list$data, cell_labels = Mmus_example_list$labels)
2626
}
2727
\keyword{heatmap}

man/M3D_Get_Extremes.Rd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
\name{M3D_Get_Extremes}
2-
\alias{M3D_Get_Extremes}
1+
\name{M3Drop_Get_Extremes}
2+
\alias{M3Drop_Get_Extremes}
33
\alias{bg__get_extreme_residuals}
44
\title{Get outliers from MM curve.}
55
\description{
66
Identifies outliers left and right of a fitted Michaelis-Menten curve.
77
}
88
\usage{
9-
M3D_Get_Extremes(expr_mat, fdr_threshold=0.1, percent=NA, v_threshold=c(0.05,0.95), suppress.plot=FALSE)
9+
M3Drop_Get_Extremes(expr_mat, fdr_threshold=0.1, percent=NA, v_threshold=c(0.05,0.95), suppress.plot=FALSE)
1010
bg__get_extreme_residuals(expr_mat, fit=NA, v_threshold=c(0.05, 0.95), percent = NA, fdr_threshold = 0.1, direction="right", suppress.plot=FALSE)
1111
}
1212
\arguments{
@@ -24,17 +24,17 @@ Only genes with dropout rates within v_threshold will be considered to avoid the
2424

2525
The normal distribution fit can be visualized by running \code{bg__get_extreme_residuals} with suppress.plot=FALSE.
2626

27-
\code{M3D_Get_Extremes} identifies both left and right residuals using the provided thresholds in each direction. Eg. will return the \code{percent} smallest and \code{percent} largest residuals. It also plots the fitted MM curve and highlights the left and right extreme outliers unless suppress.plot=TRUE .
27+
\code{M3Drop_Get_Extremes} identifies both left and right residuals using the provided thresholds in each direction. Eg. will return the \code{percent} smallest and \code{percent} largest residuals. It also plots the fitted MM curve and highlights the left and right extreme outliers unless suppress.plot=TRUE .
2828

2929
}
3030
\value{
31-
\code{M3D_Get_Extremes} List containing elements left and right, vectors of the names of the extreme genes to the left and right of the curve respectively.
31+
\code{M3Drop_Get_Extremes} List containing elements left and right, vectors of the names of the extreme genes to the left and right of the curve respectively.
3232
\code{bg__get_extreme_residuals} vector of names of the genes of the extreme genes.
3333
}
3434
\examples{
3535
library(M3DExampleData)
36-
extreme_gene_lists = M3D_Get_Extremes(Mmus_example_list$data, fdr_threshold=0.1, suppress.plot=TRUE)
37-
extreme_gene_lists = M3D_Get_Extremes(Mmus_example_list$data, percent=0.01) # plots fitted MM and highlights extreme genes.
36+
extreme_gene_lists = M3Drop_Get_Extremes(Mmus_example_list$data, fdr_threshold=0.1, suppress.plot=TRUE)
37+
extreme_gene_lists = M3Drop_Get_Extremes(Mmus_example_list$data, percent=0.01) # plots fitted MM and highlights extreme genes.
3838

3939
R_extreme_genes = bg__get_extreme_residuals(Mmus_example_list$data, direction="right", fdr_threshold=0.05) #plots the fitted normal distribution
4040
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
\name{M3D_Get_Heatmap_Cell_Clusters}
2-
\alias{M3D_Get_Heatmap_Cell_Clusters}
1+
\name{M3Drop_Get_Heatmap_Cell_Clusters}
2+
\alias{M3Drop_Get_Heatmap_Cell_Clusters}
33
\title{Extracts cell clusters from heatmap output}
44
\description{Extracts the clustering correponding to the given number of clusters from heatmap output.}
5-
\usage{M3D_Get_Heatmap_Cell_Clusters(heatmap_output, k)}
5+
\usage{M3Drop_Get_Heatmap_Cell_Clusters(heatmap_output, k)}
66
\arguments{
77
\item{heatmap_output}{Output from a gene-expression heatmap.}
88
\item{k}{Number of clusters.}
@@ -11,7 +11,7 @@
1111
\value{A vector of cluster labels for each cell.}
1212
\examples{
1313
library(M3DExampleData)
14-
heatmap_out = M3D_Expression_Heatmap(rownames(Mmus_example_list$data)[1:20], Mmus_example_list$data)
15-
clusters = M3D_Get_Heatmap_Cell_Clusters(heatmap_out, k=5)
14+
heatmap_out = M3Drop_Expression_Heatmap(rownames(Mmus_example_list$data)[1:20], Mmus_example_list$data)
15+
clusters = M3Drop_Get_Heatmap_Cell_Clusters(heatmap_out, k=5)
1616
}
1717
\keyword{heatmap}

man/M3D_ThreeSet_Venn.Rd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
\name{M3D_ThreeSet_Venn}
2-
\alias{M3D_ThreeSet_Venn}
1+
\name{M3Drop_ThreeSet_Venn}
2+
\alias{M3Drop_ThreeSet_Venn}
33
\title{Three-way Venn Diagram}
44
\description{
55
Plot an area-proportional three-set Venn Diagram with labels.
66
}
77
\usage{
8-
M3D_ThreeSet_Venn(set1, set2, set3, names)
8+
M3Drop_ThreeSet_Venn(set1, set2, set3, names)
99
}
1010
\arguments{
1111
\item{set1}{a vector of items in the first set.}
@@ -17,6 +17,6 @@
1717
}
1818
\value{None}
1919
\examples{
20-
M3D_ThreeSet_Venn(c(1:20), c(15:30), c(5,10,15,20,25,30,35,40,45,50,55,60), names=c("A","B","C"))
20+
M3Drop_ThreeSet_Venn(c(1:20), c(15:30), c(5,10,15,20,25,30,35,40,45,50,55,60), names=c("A","B","C"))
2121
}
2222
\keyword{Venn Diagram}

man/M3D_getmarkers.Rd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
\name{M3D_getmarkers}
2-
\alias{M3D_getmarkers}
1+
\name{M3Drop_getmarkers}
2+
\alias{M3Drop_getmarkers}
33
\title{Identify marker genes}
44
\description{
55
Calculates area under the ROC curve for each gene to predict the best group of cells from all other cells.
66
}
77
\usage{
8-
M3D_getmarkers(expr_mat, labels)
8+
M3Drop_getmarkers(expr_mat, labels)
99
}
1010
\arguments{
1111
\item{expr_mat}{a numeric matrix of expression values, columns = samples, rows = genes.}
@@ -18,6 +18,6 @@
1818
}
1919
\examples{
2020
library(M3DExampleData)
21-
marker_gene_table = M3D_getmarkers(Mmus_example_list$data, Mmus_example_list$labels)
21+
marker_gene_table = M3Drop_getmarkers(Mmus_example_list$data, Mmus_example_list$labels)
2222
}
2323
\keyword{markers}

0 commit comments

Comments
 (0)