paiva-s-lab / FlowCT

FlowCT: A semi-automated workflow for deconvolution of immunophenotypic data and objective reporting on large datasets
4 stars 4 forks source link

dr.plotting #10

Closed Aminach1 closed 8 months ago

Aminach1 commented 8 months ago

Hello,

when I try to visualize the UMAP with all surface markers (color.by is not specified), I get this error:

Error in melt.data.table(as.data.table(drmd), measure.vars = no.omit.markers, : One or more values in 'measure.vars' are invalid.

If I enter color.by = "expression" and omit.markers = physical_markers, it doesn't work either.

How can I fix this problem?

jgarces02 commented 8 months ago

Hi @Aminach1, could you paste the code you're using, please?

Aminach1 commented 8 months ago

of course!

library(FlowCT)

# markers selection
surface_markers <- c("CD127","CD11c", "CD38", "CD123", "CCR7","CD3", "IgD","CD28", "CD24", "CD56", "CD14", "CD57", "HLA-DR", "TCRgd", "CD27", "CD34", "CD19", "CD25", "CD16", "CD8", "CD161", "CD4", "CD45RA")

physical_markers <- c("FSC_A","FSC_H","SSC_A","SSC_B_A","SSC_B_H", "SSC_H", "viab", "Time", "CD45")

fcsred <- sub.samples(fcs.SCE = fcs, subsampling = 1000)
fcsred <- dim.reduction(fcsred, dr.method = c("UMAP", "pca"), assay.i = "transformed", n.neighbors.umap = 50, markers.to.use = surface_markers)
dr.plotting(fcsred, plot.dr = "UMAP", size = 0.8,assay.i = "transformed")

Error in melt.data.table(as.data.table(drmd), measure.vars = no.omit.markers, :
One or more values in 'measure.vars' is invalid.
jgarces02 commented 8 months ago

I think the problem is coming from your marker "HLA-DR", it should be "HLA_DR" (R don't understand hyphens).

Btw, are you sure you want to use "viab" and "Time" in the reduction? And be aware because your CD45 is also between the physical markers.

Aminach1 commented 8 months ago

@jgarces02 Oh, I didn't realize that. You're right, the marker "HLA-DR" was the problem. And I won't include "viab" and "Time" in the downstream analysis. Thanks for the mention anyway. It is always helpful. Thanks a bunch