ktplots icon indicating copy to clipboard operation
ktplots copied to clipboard

proble Please check your options for splitby_key and your celltypes.

Open dd123456000 opened this issue 1 year ago • 11 comments

I encountered the following issue while using plotcb.

image

image

I've tried changing many things, but I'm still getting the same error.

dd123456000 avatar Dec 14 '23 08:12 dd123456000

image

dd123456000 avatar Dec 14 '23 08:12 dd123456000

image

image

dd123456000 avatar Dec 14 '23 08:12 dd123456000

"I changed 'celltype' to 'cell_type,' and now I'm encountering the error 'Error in c_type1[[i]]: subscript out of bounds.'"

dd123456000 avatar Dec 14 '23 09:12 dd123456000

Does the "celltype" or "cell_type" exist in your [email protected]? Also remove the the split.by argument - don't provide NA to it.

zktuong avatar Dec 14 '23 10:12 zktuong

I'm having the same problem. The "predicted" column exists in the object (ad is a SingleCellExperiment object).

plot_cpdb2(
    scdata = ad,
    cell_type1 = "HSC",
    cell_type2 = ".",
    celltype_key = "predicted", # column name where the cell ids are located in the metadata
    means = means,
    pvals = pvals,
    deconvoluted = HD_deconv 
)

Error in plot_cpdb(scdata = scdata, cell_type1 = cell_type1, cell_type2 = cell_type2, : Please check your options for splitby_key and your celltypes.

luostrowski avatar Jan 09 '24 22:01 luostrowski

hi @luostrowski, just in case, can you check if the means and pvals are the correct ones that match to your ad object. when library(ktplots) is called, it will also load the internal data (also called means and pvals). this may overwrite your actual objects.

zktuong avatar Jan 09 '24 23:01 zktuong

Hi! Thank you for the prompt reply! I changed the names of the data frames to make sure it was not being overwritten, but I got the same error :(

plot_cpdb2(
    scdata = ad,
    cell_type1 = "HSC",
    cell_type2 = ".",
    celltype_key = "predicted", # column name where the cell ids are located in the metadata
    means = HD_means,
    pvals = HD_pvals,
    deconvoluted = HD_deconv
)

Error in plot_cpdb(scdata = scdata, cell_type1 = cell_type1, cell_type2 = cell_type2, : Please check your options for splitby_key and your celltypes.

luostrowski avatar Jan 10 '24 00:01 luostrowski

would you be able to share your files (ad, HD_means, HD_pvals, HD_deconv) so that i can do some testing? I just sent you the secure voucher link via filesender (to your gmail)

zktuong avatar Jan 10 '24 00:01 zktuong

issue may be related to https://github.com/zktuong/ktplotspy/issues/51

zktuong avatar Jan 10 '24 13:01 zktuong

seems like the fix introduces further bugs (e.g. plotting non-significant interactions). need to think of a different solution

zktuong avatar Feb 15 '24 01:02 zktuong

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 22 '24 04:04 stale[bot]