Error when using custom marker dataframe
niccolovono opened this issue · 1 comments
Hi,
after implementing a custom dataset as suggested here, i got an error that seems not to match some elements between findmarkergene and findcelltype function.
The error is this one:
ann_cell3 <- findcelltype(object = ann_mark3, verbose = T) Error in if (unique(clu_ann_for_det$variable == "subtype1")) { : the condition has length > 1
Here's how I implemented the dataframe:
Custom_mark_cc <- data.frame(species = Cell_marker_Human_cc$species, tissue = c('Colon'), cancer = Cell_marker_Human_cc$cancer_type, condition = Cell_marker_Human_cc$cell_type, subtype1 = 'NA', subtype2 = 'NA', subtype3 = 'NA', celltype = Cell_marker_Human_cc$cell_name, gene = Cell_marker_Human_cc$marker, resource = Cell_marker_Human_cc$marker_source, pmid = Cell_marker_Human_cc$PMID)
and this is a preview of the same:
.
When I run the function findmarkergene
like this:
ann_mark3 <- findmarkergene(object = ann_obj, species = "Human", marker = Custom_mark_cc, tissue = "Colon", cancer = 'Colon Cancer', verbose = T, use_method = 1 )
everything seems to be ok, but when trying to apply findcelltype
function like this:
ann_cell3 <- findcelltype(object = ann_mark3, verbose = T)
the above error appears.
Do you have some suggestion?
I have already tried some troubleshoot like reinstalling scCATCH, adding the argument if_use_custom_marker =TRUE
but nothing changes.
Thank you for your time and help
Me Too