diff --git a/R/branchPropTest.R b/R/branchPropTest.R index 8a48631..a4dcc91 100644 --- a/R/branchPropTest.R +++ b/R/branchPropTest.R @@ -15,7 +15,7 @@ branchPropTest <- function(data, design, method = 't.test') { if (method == 't.test'){ id1 = which(design[, 2] == 0) id2 = which(design[, 2] == 1) - res <- apply(data, 1, function(i) + res <- apply(data[,design[,1]], 1, function(i) t.test(i[id1], i[id2])$p.value) } diff --git a/R/getPopulationFit.R b/R/getPopulationFit.R index da10f4d..5dc26d9 100644 --- a/R/getPopulationFit.R +++ b/R/getPopulationFit.R @@ -17,7 +17,7 @@ getPopulationFit <- function(testobj, gene = NULL, type = 'time', - num.timepoint = 1e3){ + num.timepoint = max(testobj$pseudotime)){ type <- toupper(type) if (!'testvar' %in% names(testobj)) { testvar <- testobj$testvar <- 2