amitfrish / scBio

Single Cell Genomics for Enhancing Cell Composition Inference from Bulk Genomics Data
21 stars 7 forks source link

task 8 failed - "Number of target elements disagrees with number of data instances." #6

Closed QqQss closed 5 years ago

QqQss commented 5 years ago

Hi, I test your tutorial data that seem run well. But when I test my data, using this command: cpm.res = CPM(test.sc, test.label, test.bulk, test.dim) then I got some errors below:

[1] "Selecting cells for each iteration"
[1] "Number of iteration: 13838"
[1] "Running CPM, this may take a few minutes"
|======================================================================| 100%
Error in { : 
  task 8 failed - "Number of target elements disagrees with number of data instances."
In addition: There were 38 warnings (use warnings() to see them)

and then I used 'warnings()' command, got these warnings:

Warning messages:
1: In drop : closing unused connection 40 (<-localhost.localdomain:11493)
2: In drop : closing unused connection 39 (<-localhost.localdomain:11493)
3: In drop : closing unused connection 38 (<-localhost.localdomain:11493)
4: In drop : closing unused connection 37 (<-localhost.localdomain:11493)
5: In drop : closing unused connection 36 (<-localhost.localdomain:11493)
6: In drop : closing unused connection 35 (<-localhost.localdomain:11493)
7: In drop : closing unused connection 34 (<-localhost.localdomain:11493)
8: In drop : closing unused connection 33 (<-localhost.localdomain:11493)
9: In drop : closing unused connection 32 (<-localhost.localdomain:11493)
10: In drop : closing unused connection 31 (<-localhost.localdomain:11493)
...

I checked all my input data's class, and all of them were same as your tutorial's.

> class(test.sc)
[1] "data.frame"
> class(test.label)
[1] "character"
> class(test.bulk)
[1] "data.frame"
> class(test.dim)
[1] "matrix"
> test.sc[1:5,1:5]
      Cell1 Cell2 Cell3 Cell4 Cell5
A2M       0     0     0     0     0
ABCA8     0     0     0     0     0
ACKR1     0     0     0     0     0
ACKR3     0     0     0     0     0
ACP5      0     0     0     0     0
> test.label %>% head
[1] "Plasma"     "Epithelial" "CD8 T"      "CD8 T"      "CD8 T"     
[6] "CD4 T"     
> test.bulk[1:5,1:5]
           Bulk1      Bulk2      Bulk3     Bulk4      Bulk5
A2M   409.103718 164.510498 439.066581 497.41605 305.957637
ABCA8  17.389392   1.614988  37.835343   3.32282  29.618035
ACKR1  21.627143   2.793492  29.192616  17.85596  13.163571
ACKR3   8.475502   5.630633   8.669485  22.85697   6.295621
ACP5   20.633464  29.462612  40.457595  78.37156  39.872266
> test.dim %>% head
               X          Y
Cell1 -0.6221399   5.121242
Cell2  1.3042641   8.636470
Cell3 -0.1648406  -8.443732
Cell4 -5.1018508 -11.183683
Cell5 -5.2779173 -11.394105
Cell6 -6.6008532  -3.686603
> test.label %>% table
.
          B       CD4 T       CD8 T Endothelial  Epithelial  Fibroblast 
        355         721        2250         143          32         203 
       Mast     Myeloid      Plasma 
        140         420         736 

So, why is this so?and how to fix it?

amitfrish commented 5 years ago

Hey, can you send me the dimensions of all your inputs?

QqQss commented 5 years ago

Hey, can you send me the dimensions of all your inputs?

you mean input files?

amitfrish commented 5 years ago

Yes, test.sc, test.label, test.bulk and test.dim

QqQss commented 5 years ago

Yes, test.sc, test.label, test.bulk and test.dim

Ok, I could give you a Rdata file containing all of these. Could you give me your e-mail?

amitfrish commented 5 years ago

Sure. amfrishberg@gmail.com.

QqQss commented 5 years ago

OK, I've sent it to you.

amitfrish commented 5 years ago

I don't know why but I didn't get it. Make sure you are sending it to the email without the dot in the end of the address.

QqQss commented 5 years ago

I used another email and sent it again. How about this time?

amitfrish commented 5 years ago

Well it seems that some of the iterations return errors since you don't provide enough genes (usually there are 20000+ genes in RNA-seq and scRNA-seq data sets. If you can, it is much better to it with all of the genes. Anyway, I will update the CRAN package to avoid this issue in the future.

QqQss commented 5 years ago

OK, I'll try it with all 20000+ genes. The reason why I only used a small set of highly variant genes it that your tutorial 'SCFlu' matrix only contain 1000+ genes...

QqQss commented 5 years ago

OK, that works. Thank for your patientce ~