yizhuo-wang / CASi

5 stars 0 forks source link

unused arguments Error when calling CrossTimeAnnotation function #4

Open muhammed-ali opened 2 months ago

muhammed-ali commented 2 months ago

I have installed all the required packages and trying to reproduce the results mentioned in the tutorial (https://yizhuo-wang.github.io/). When running the "CrossTimeAnnotation" function on the l1 object, I am getting the following error:

require(keras) require(CASi)

data(pbmc_demo) names(pbmc_demo) [1] "train_count" "train_label" "test_count" "test_label" l1 <- CreateCASiList(t0_count = as.matrix(pbmc_demo[[1]]), t1_count = as.matrix(pbmc_demo[[3]]), t0_label = pbmc_demo[[2]]) names(l1) [1] "Data: t0 cells gene expression" "Data: t0 cell types" "Data: t1 cell gene expression" l1 <- CrossTimeAnnotation(l1) Error in (function (x, num_classes = NULL) : unused arguments (y = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

Please help me resolve this issue. Thanks!

muhammed-ali commented 2 months ago

I tried to debug the issue and the error is coming when I run the following command (line 68 of CrossTimeAnnotation.R)

t0_label <- keras::to_categorical(train_temp[, ncol(train_temp)] - 1)
Error in (function (x, num_classes = NULL)  :
  unused arguments (y = c(2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 7, 7, 1, 1, 8, 1, 1, 7, 2, 1, 8, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 8, 1, 7, 1, 0, 8, 1, 5, 0, 1, 2, 1, 8, 0, 8, 1, 8, 1, 8, 6, 8, 1, 8, 0, 0, 8, 1, 0, 1, 1, 7, 8, 0, 1, 1, 8, 8, 0, 8, 0, 1, 8, 8, 8, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 7, 4, 0, 8, 8, 0, 1, 1, 0, 4, 8, 8, 1, 7, 1, 4, 0, 7, 8, 7, 1, 6, 1, 1, 4, 0, 4, 4, 6, 4, 4, 8, 0, 1, 0, 4, 4, 0, 8, 8, 0, 8, 4, 8, 3, 4, 1, 7, 4, 8, 4, 4, 8, 0, 8, 1, 3, 4, 1, 0, 1, 8, 4, 8, 8, 0, 4, 1, 8, 4, 0,
8, 8, 0, 1, 0, 8, 0, 8, 4, 1, 4, 0, 4, 4, 1, 8, 4, 0, 4, 0, 8,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