... | ... |
@@ -4,6 +4,7 @@ export(CLR_FN) |
4 | 4 |
export(DESEQ_FN) |
5 | 5 |
export(FQT_FN) |
6 | 6 |
export(FQ_FN) |
7 |
+export(SCRAN_FN) |
|
7 | 8 |
export(SUM_FN) |
8 | 9 |
export(SconeExperiment) |
9 | 10 |
export(TMM_FN) |
... | ... |
@@ -103,6 +104,7 @@ importFrom(rhdf5,h5ls) |
103 | 104 |
importFrom(rhdf5,h5read) |
104 | 105 |
importFrom(rhdf5,h5write) |
105 | 106 |
importFrom(rhdf5,h5write.default) |
107 |
+importFrom(scran,computeSumFactors) |
|
106 | 108 |
importFrom(shiny,br) |
107 | 109 |
importFrom(shiny,brushedPoints) |
108 | 110 |
importFrom(shiny,column) |
... | ... |
@@ -120,4 +120,21 @@ CLR_FN = function (ei) |
120 | 120 |
scales = exp(-colMedians(scale_mat, na.rm = TRUE)) |
121 | 121 |
eo = t(t(ei) * mean(scales) / scales) |
122 | 122 |
return(eo) |
123 |
+} |
|
124 |
+ |
|
125 |
+#' Simple deconvolution normalization wrapper |
|
126 |
+#' @importFrom scran computeSumFactors |
|
127 |
+#' @details SCONE scaling wrapper for \code{\link[scran]{computeSumFactors}}). |
|
128 |
+#' @export |
|
129 |
+#' @param ei Numerical matrix. (rows = genes, cols = samples). |
|
130 |
+#' @return scran normalized matrix. |
|
131 |
+#' |
|
132 |
+#' @examples |
|
133 |
+#' ei <- matrix(0:76,nrow = 7) |
|
134 |
+#' eo <- SCRAN_FN(ei) |
|
135 |
+#' |
|
136 |
+SCRAN_FN = function(ei){ |
|
137 |
+ scales = computeSumFactors(ei, sizes = ceiling(sqrt(ncol(ei)))) |
|
138 |
+ eo = t(t(ei) * mean(scales) / scales) |
|
139 |
+ return(eo) |
|
123 | 140 |
} |
124 | 141 |
\ No newline at end of file |
125 | 142 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,25 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/SCONE_DEFAULTS.R |
|
3 |
+\name{SCRAN_FN} |
|
4 |
+\alias{SCRAN_FN} |
|
5 |
+\title{Simple deconvolution normalization wrapper} |
|
6 |
+\usage{ |
|
7 |
+SCRAN_FN(ei) |
|
8 |
+} |
|
9 |
+\arguments{ |
|
10 |
+\item{ei}{Numerical matrix. (rows = genes, cols = samples).} |
|
11 |
+} |
|
12 |
+\value{ |
|
13 |
+scran normalized matrix. |
|
14 |
+} |
|
15 |
+\description{ |
|
16 |
+Simple deconvolution normalization wrapper |
|
17 |
+} |
|
18 |
+\details{ |
|
19 |
+SCONE scaling wrapper for \code{\link[scran]{computeSumFactors}}). |
|
20 |
+} |
|
21 |
+\examples{ |
|
22 |
+ei <- matrix(0:76,nrow = 7) |
|
23 |
+eo <- SCRAN_FN(ei) |
|
24 |
+ |
|
25 |
+} |