Browse code

fix logLikelihood.celda_C/G/CG

zhewa authored on 08/04/2019 17:34:24
Showing 7 changed files

... ...
@@ -24,9 +24,9 @@ export(featureModuleLookup)
24 24
 export(featureModuleTable)
25 25
 export(geneSetEnrich)
26 26
 export(logLikelihood)
27
-export(logLikelihoodCeldaC)
28
-export(logLikelihoodCeldaCG)
29
-export(logLikelihoodCeldaG)
27
+export(logLikelihood.celda_C)
28
+export(logLikelihood.celda_CG)
29
+export(logLikelihood.celda_G)
30 30
 export(logLikelihoodHistory)
31 31
 export(matrixNames)
32 32
 export(moduleHeatmap)
... ...
@@ -743,7 +743,7 @@ setMethod("factorizeMatrix", signature(celdaMod = "celda_C"),
743 743
 #' @return Numeric. The log likelihood for the given cluster assignments
744 744
 #' @seealso `celda_C()` for clustering cells
745 745
 #' @examples
746
-#' loglik <- logLikelihoodCeldaC(celdaCSim$counts,
746
+#' loglik <- logLikelihood.celda_C(celdaCSim$counts,
747 747
 #'     sampleLabel = celdaCSim$sampleLabel,
748 748
 #'     z = celdaCSim$z,
749 749
 #'     K = celdaCSim$K,
... ...
@@ -758,7 +758,7 @@ setMethod("factorizeMatrix", signature(celdaMod = "celda_C"),
758 758
 #'     alpha = celdaCSim$alpha,
759 759
 #'     beta = celdaCSim$beta)
760 760
 #' @export
761
-logLikelihoodCeldaC <- function(counts, sampleLabel, z, K, alpha, beta) {
761
+logLikelihood.celda_C <- function(counts, sampleLabel, z, K, alpha, beta) {
762 762
 
763 763
     if (sum(z > K) > 0) {
764 764
         stop("An entry in z contains a value greater than the provided K.")
... ...
@@ -933,7 +933,7 @@ setMethod("factorizeMatrix", signature(celdaMod = "celda_CG"),
933 933
 #' @return The log likelihood for the given cluster assignments
934 934
 #' @seealso `celda_CG()` for clustering features and cells
935 935
 #' @examples
936
-#' loglik <- logLikelihoodCeldaCG(celdaCGSim$counts,
936
+#' loglik <- logLikelihood.celda_CG(celdaCGSim$counts,
937 937
 #'     sampleLabel = celdaCGSim$sampleLabel,
938 938
 #'     z = celdaCGSim$z,
939 939
 #'     y = celdaCGSim$y,
... ...
@@ -956,7 +956,7 @@ setMethod("factorizeMatrix", signature(celdaMod = "celda_CG"),
956 956
 #'     gamma = celdaCGSim$gamma,
957 957
 #'     delta = celdaCGSim$delta)
958 958
 #' @export
959
-logLikelihoodCeldaCG <- function(counts,
959
+logLikelihood.celda_CG <- function(counts,
960 960
     sampleLabel,
961 961
     z,
962 962
     y,
... ...
@@ -713,7 +713,7 @@ setMethod("factorizeMatrix", signature(celdaMod = "celda_G"),
713 713
 #' @return The log-likelihood for the given cluster assignments.
714 714
 #' @seealso `celda_G()` for clustering features
715 715
 #' @examples
716
-#' loglik <- logLikelihoodCeldaG(celdaGSim$counts,
716
+#' loglik <- logLikelihood.celda_G(celdaGSim$counts,
717 717
 #'     y = celdaGSim$y,
718 718
 #'     L = celdaGSim$L,
719 719
 #'     beta = celdaGSim$beta,
... ...
@@ -728,7 +728,7 @@ setMethod("factorizeMatrix", signature(celdaMod = "celda_G"),
728 728
 #'     delta = celdaGSim$delta,
729 729
 #'     gamma = celdaGSim$gamma)
730 730
 #' @export
731
-logLikelihoodCeldaG <- function(counts, y, L, beta, delta, gamma) {
731
+logLikelihood.celda_G <- function(counts, y, L, beta, delta, gamma) {
732 732
     if (sum(y > L) > 0) {
733 733
         stop("An entry in y contains a value greater than the provided L.")
734 734
     }
735 735
similarity index 88%
736 736
rename from man/logLikelihoodCeldaC.Rd
737 737
rename to man/logLikelihood.celda_C.Rd
... ...
@@ -1,10 +1,10 @@
1 1
 % Generated by roxygen2: do not edit by hand
2 2
 % Please edit documentation in R/celda_C.R
3
-\name{logLikelihoodCeldaC}
4
-\alias{logLikelihoodCeldaC}
3
+\name{logLikelihood.celda_C}
4
+\alias{logLikelihood.celda_C}
5 5
 \title{Calculate Celda_C log likelihood}
6 6
 \usage{
7
-logLikelihoodCeldaC(counts, sampleLabel, z, K, alpha, beta)
7
+logLikelihood.celda_C(counts, sampleLabel, z, K, alpha, beta)
8 8
 }
9 9
 \arguments{
10 10
 \item{counts}{Integer matrix. Rows represent features and columns represent
... ...
@@ -33,7 +33,7 @@ Calculates the log likelihood for user-provided cell population
33 33
  clusters using the `celda_C()` model.
34 34
 }
35 35
 \examples{
36
-loglik <- logLikelihoodCeldaC(celdaCSim$counts,
36
+loglik <- logLikelihood.celda_C(celdaCSim$counts,
37 37
     sampleLabel = celdaCSim$sampleLabel,
38 38
     z = celdaCSim$z,
39 39
     K = celdaCSim$K,
40 40
similarity index 91%
41 41
rename from man/logLikelihoodCeldaCG.Rd
42 42
rename to man/logLikelihood.celda_CG.Rd
... ...
@@ -1,10 +1,10 @@
1 1
 % Generated by roxygen2: do not edit by hand
2 2
 % Please edit documentation in R/celda_CG.R
3
-\name{logLikelihoodCeldaCG}
4
-\alias{logLikelihoodCeldaCG}
3
+\name{logLikelihood.celda_CG}
4
+\alias{logLikelihood.celda_CG}
5 5
 \title{Calculate Celda_CG log likelihood}
6 6
 \usage{
7
-logLikelihoodCeldaCG(counts, sampleLabel, z, y, K, L, alpha, beta, delta,
7
+logLikelihood.celda_CG(counts, sampleLabel, z, y, K, L, alpha, beta, delta,
8 8
   gamma)
9 9
 }
10 10
 \arguments{
... ...
@@ -44,7 +44,7 @@ Calculates the log likelihood for user-provided cell population
44 44
  and feature module clusters using the `celda_CG()` model.
45 45
 }
46 46
 \examples{
47
-loglik <- logLikelihoodCeldaCG(celdaCGSim$counts,
47
+loglik <- logLikelihood.celda_CG(celdaCGSim$counts,
48 48
     sampleLabel = celdaCGSim$sampleLabel,
49 49
     z = celdaCGSim$z,
50 50
     y = celdaCGSim$y,
51 51
similarity index 89%
52 52
rename from man/logLikelihoodCeldaG.Rd
53 53
rename to man/logLikelihood.celda_G.Rd
... ...
@@ -1,10 +1,10 @@
1 1
 % Generated by roxygen2: do not edit by hand
2 2
 % Please edit documentation in R/celda_G.R
3
-\name{logLikelihoodCeldaG}
4
-\alias{logLikelihoodCeldaG}
3
+\name{logLikelihood.celda_G}
4
+\alias{logLikelihood.celda_G}
5 5
 \title{Calculate Celda_G log likelihood}
6 6
 \usage{
7
-logLikelihoodCeldaG(counts, y, L, beta, delta, gamma)
7
+logLikelihood.celda_G(counts, y, L, beta, delta, gamma)
8 8
 }
9 9
 \arguments{
10 10
 \item{counts}{Integer matrix. Rows represent features and columns represent
... ...
@@ -33,7 +33,7 @@ Calculates the log likelihood for user-provided feature module
33 33
  clusters using the `celda_G()` model.
34 34
 }
35 35
 \examples{
36
-loglik <- logLikelihoodCeldaG(celdaGSim$counts,
36
+loglik <- logLikelihood.celda_G(celdaGSim$counts,
37 37
     y = celdaGSim$y,
38 38
     L = celdaGSim$L,
39 39
     beta = celdaGSim$beta,