YMa-lab / CARD

GNU General Public License v3.0
80 stars 20 forks source link

error(attempt to select less than one element in get1index) when running CARD_deconvolution() #34

Closed cynthier closed 1 year ago

cynthier commented 1 year ago

Hi, when I try to run CARD_deconvolution after creating CARDObject, I meet with the error and can you help me ?

CARD_obj = createCARDObject( sc_count = rnacount, sc_meta = rna_meta, spatial_count = spatialcount, spatial_location = spatialInfo, ct.varname = "label", ct.select = unique(rna_meta$label), sample.varname = "timepoint", minCountGene = 100, minCountSpot = 10)

CARD_obj = CARD_deconvolution(CARD_object = CARD_obj)

output: Select Informative Genes! ... Deconvolution Starts! ... Error in ResList[[Optimal]]: attempt to select less than one element in get1index Traceback:

  1. CARD_deconvolution(CARD_object = CARD_obj) attempt to select less than one element in get1index
cynthier commented 1 year ago

when I run the code in R folder but not using CARD package, another error appear.

Error in CARDref(XinputIn = as.matrix(Xinput_norm), UIn = as.matrix(B), : object '_CARD_CARDref' not found Traceback:

YingMa0107 commented 1 year ago

Hi @cynthier,

Thank you very much for your interest in our package.

Based on your message, there might be some interim errors. Would it be possible for your to send a copy of your data to me (yingma@umich.edu) or put it in some public directories. That will be easier for me to replicate the error and help you to debug it.

For your second error, could you please elaborate more? Do you mean that you did not install the CARD package but just run the scripts provided by CARD?

Thank you!

cynthier commented 1 year ago

Hi, Thank you so much for your attention and reply. I solved the problem and CARD work perfectly now.

YingMa0107 commented 1 year ago

Hi @cynthier,

No problem. Let me know if you have further questions.

njjyxl commented 3 months ago

How did you solve it? I also encountered the same problem. Obj output was all NaN.