Open cgoneill opened 2 years ago
Hi,
Thanks for using condiments and for providing such a comprehensive report.
Could you please show me that the project_char
column looks like?
Thanks
Thanks for your response. Here's the brief overview of the column:
> summary(unwounded.ife.sce$project_char)
Length Class Mode
18063 character character
> head(unwounded.ife.sce$project_char)
[1] "vehicle nondiabetic unwounded" "vehicle nondiabetic unwounded" "vehicle nondiabetic unwounded" "vehicle nondiabetic unwounded" "vehicle nondiabetic unwounded" "vehicle nondiabetic unwounded"
> unwounded.ife.sce$project_char %>% as.factor() %>% levels()
[1] "tamoxifen diabetic unwounded" "tamoxifen nondiabetic unwounded" "vehicle diabetic unwounded" "vehicle nondiabetic unwounded"
I tried to run topologyTest()
again with a metadata column using _
as a separator in place of
, but I encountered the same error message, so I don't think that's the problem.
Ok I don't see anything weird.
Can you give me the traceback
of the error?
I set reps = 10
for this iteration to get a quicker reproduction of the problem.
> traceback()
17: .check_d(x, y)
16: (function (x, y, split = 0.7, thresh = 0, method = "knn", control = caret::trainControl(method = "cv"),
...)
{
if ("list" %in% methods::is(x)) {
.check_d(x)
names(x) <- paste0("C", seq_along(x))
x <- lapply(x, as.data.frame)
X <- dplyr::bind_rows(x, .id = "type")
X$type <- as.factor(X$type)
}
else {
.check_d(x, y)
X <- dplyr::bind_rows(C1 = as.data.frame(x), C2 = as.data.frame(y),
.id = "type")
X$type <- as.factor(X$type)
}
min_size <- min(table(X$type))
X <- X %>% dplyr::group_by(type) %>% dplyr::slice_sample(n = min_size) %>%
dplyr::ungroup()
training_set <- createDataPartition(X$type, p = split)
...
15: do.call(what = Ecume::classifier_test, args = args)
14: FUN(X[[i]], ...)
13: lapply(threshs, function(thresh) {
args <- args_classifier
args$x <- as.matrix(og$psts)
args$y <- psts
args$thresh <- thresh
test <- do.call(what = Ecume::classifier_test, args = args)
return(data.frame(statistic = test$statistic, p.value = test$p.value))
})
12: .topologyTest_classifier(permutations, og, threshs, sds, rep,
args_classifier)
11: .topologyTest_all_selected(curves$permutations, curves$og, conditions,
sds, methods, threshs, rep, args_classifier, args_mmd, args_wass,
distinct_samples)
10: list2(...)
9: bind_rows(., .id = "method")
8: .topologyTest_all_selected(curves$permutations, curves$og, conditions,
sds, methods, threshs, rep, args_classifier, args_mmd, args_wass,
distinct_samples) %>% bind_rows(.id = "method")
7: .topologyTest(sds = sds, conditions = conditions, rep = rep,
threshs = threshs, methods = methods, parallel = parallel,
BPPARAM = BPPARAM, args_mmd = args_mmd, args_wass = args_wass,
args_classifier = args_classifier, nmax = nmax, distinct_samples = distinct_samples)
6: .local(sds, ...)
5: topologyTest(slingshot::SlingshotDataSet(sds), conditions = conditions,
rep = rep, threshs = threshs, methods = methods, parallel = parallel,
BPPARAM = BPPARAM, args_mmd = args_mmd, args_wass = args_wass,
args_classifier = args_classifier, nmax = nmax, distinct_samples = distinct_samples)
4: topologyTest(slingshot::SlingshotDataSet(sds), conditions = conditions,
rep = rep, threshs = threshs, methods = methods, parallel = parallel,
BPPARAM = BPPARAM, args_mmd = args_mmd, args_wass = args_wass,
args_classifier = args_classifier, nmax = nmax, distinct_samples = distinct_samples)
3: .local(sds, ...)
2: topologyTest(unwounded.ife.sce, conditions = "project_char",
rep = 10)
1: topologyTest(unwounded.ife.sce, conditions = "project_char",
rep = 10)
Ok, I cannot reproduce that issue. Would you mind emailing me the data at hector dot rouxdebezieux at gmail dot com ? Thanks
Hello. I have been getting exactly the same error mentioned in this issue. Did you get to a conclusio on what it was?
Best regards
Sorry no I have not.
Hi, any updates here? I have the same issue with three conditions.
Hi, not sure if this error was ever fixed, but I am facing the same error with 4 conditions..
Ok I now have some more bandwidth to consider. The issue has not been fixed. Can someone share their data and I will work on this issue. Thanks
Hello, and thank you for your excellent work on condiments. I'm following along with the KRAS analysis vignette you outlined on the condimentsPaper repository on my four-condition dataset that I converted to a SingleCellExperiment object from a Seurat object, but when I get to
topologyTest()
, I get the following error:I've tried getting the character vector to pass to
conditions
a few ways but I keep running into that error. My understanding from the documentation and the KRAS vignette is that I can pass a character tocondition
that tellstopologyTest()
which column of the metadata has the vector, but even if I isolate the vector containing that information and pass it separately, it returns the same error.I've tried running
topologyTest()
with a different column in the metadata (just the treatment as opposed to the disease state, which is a binary) to see if the issue is specific to the Classifier test, and it worked when using the KS test on a two-condition metadata column:I take this to mean the KS test would work if I ran it on the treatment and disease state conditions separately, but not on the unified metadata column.
Is there something missing from my use of the function with the Classifier test?
Here's the session info: