Skip to content

Commit f26821c

Browse files
updated
1 parent 16d097b commit f26821c

File tree

112 files changed

+66
-3325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+66
-3325
lines changed

R/.DS_Store

6 KB
Binary file not shown.

R/.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$

R/DESCRIPTION

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Package: SCRABBLE
22
Type: Package
3-
Title: Impute scRNAseq data method
3+
Title: Impute scRNAseq Data Method
44
Version: 0.0.1
55
Author: Tao Peng
66
Maintainer: The package maintainer Tao Peng <software.github@gmail.com>
7-
Description: SCRABBLE imputes drop-out data by optimizing an objective function
7+
Description: It aims to impute drop-out data by optimizing an objective function
88
that consists of three terms. The first term ensures that imputed values for
99
genes with nonzero expression remain as close to their original values as possible,
1010
thus minimizing unwanted bias towards expressed genes. The second term ensures the
@@ -23,8 +23,10 @@ Imports: Rcpp (>= 0.12.13),
2323
ggplot2,
2424
RColorBrewer,
2525
reshape2,
26-
gridExtra
27-
LinkingTo: Rcpp, RcppEigen, gridExtra
26+
gridExtra,
27+
methods,
28+
grDevices
29+
LinkingTo: Rcpp, RcppEigen
2830
RoxygenNote: 6.1.1
2931
Suggests: knitr,rmarkdown,BiocStyle
3032
VignetteBuilder: knitr

R/NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ import(ggplot2)
1010
import(RColorBrewer)
1111
import(reshape2)
1212
import(gridExtra)
13+
import(methods)
14+
import(grDevices)

R/R/.DS_Store

6 KB
Binary file not shown.

R/R/.Rd2pdf14510/Rd2.tex

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/R/.Rd2pdf15102/Rd2.tex

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/R/.Rd2pdf15116/Rd2.tex

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/R/plotting_functions.R

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
# plot the figures of data
2+
#'
3+
#' It is used to plot the data as a images
4+
#'
5+
#' @param data the input data which is a data matrix.
6+
#'
7+
#' @param name the name of the data and it is a string.
8+
#'
9+
#'
10+
#' @examples
11+
#' # Run plot_data
12+
#' p <- plot_data(demo_data[[1]],"Drop-out Data")
13+
#'
14+
#' @return ggplot handler
15+
#'
16+
#' @export
17+
#'
18+
#'
19+
220
plot_data <- function(data,name){
321
limit <- c(0,5)
422
myPalette <- colorRampPalette(rev(brewer.pal(11, "Spectral")))
523
print(dim(data))
624
colnames(data) <- NULL
725
rownames(data) <- NULL
826
longData<-melt(as.matrix(data))
9-
pl <- ggplot(longData, aes(x = Var2, y = Var1)) +
10-
geom_raster(aes(fill=value)) +
27+
colnames(longData) <- c("Var1", "Var2","value")
28+
pl <- ggplot(longData, aes_string(x = "Var2", y = "Var1")) +
29+
geom_raster(aes_string(fill= "value")) +
1130
scale_colour_gradient2(limits=c(0, 5)) +
1231
scale_fill_gradientn(colours = c("white", "blue", "red"), values = c(0,0.6,1)) +
1332
theme_bw() +

R/R/scrabble.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#' Runs SCRABBLE
22
#'
3-
#' SCRABBLE imputes drop-out data by optimizing an objective function that consists of three terms.
3+
#' This package imputes drop-out data by optimizing an objective function that consists of three terms.
44
#' The first term ensures that imputed values for genes with nonzero expression remain as close to their
55
#' original values as possible, thus minimizing unwanted bias towards expressed genes. The second term ensures
66
#' the rank of the imputed data matrix to be as small as possible. The rationale is that we only expect a
77
#' limited number of distinct cell types in the samples. The third term operates on the bulk RNA-Seq data.
88
#' It ensures consistency between the average gene expression of the aggregated imputed data and the
9-
#' average gene expression of the bulk RNA-Seq data. We developed 58 a convex optimization algorithm to minimize
9+
#' average gene expression of the bulk RNA-Seq data. We developed a convex optimization algorithm to minimize
1010
#' the objective function.
1111
#'
1212
#'
@@ -31,7 +31,7 @@
3131
#' parameter <- c(1, 1e-6, 1e-4)
3232
#'
3333
#' # Run SCRABLE
34-
#' result <- scrabble(data,parameter = parameter)
34+
#' result <- scrabble(demo_data,parameter = parameter)
3535
#'
3636
#' @return A data matrix with the same size of the input scRNAseq data
3737
#'

R/R/test_scrabble.Rmd

Lines changed: 0 additions & 16 deletions
This file was deleted.

R/README_R.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/DESCRIPTION

Lines changed: 0 additions & 27 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/NAMESPACE

Lines changed: 0 additions & 12 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/R/.Rd2pdf14510/Rd2.tex

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/R/.Rd2pdf15102/Rd2.tex

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/R/.Rd2pdf15116/Rd2.tex

Lines changed: 0 additions & 13 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/R/RcppExports.R

Lines changed: 0 additions & 67 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/R/data.R

Lines changed: 0 additions & 15 deletions
This file was deleted.

R/SCRABBLE.Rcheck/00_pkg_src/SCRABBLE/R/plotting_functions.R

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)