KlugerLab / DAseq

MIT License
39 stars 5 forks source link

Getting started after integration #5

Open KeeBak opened 3 years ago

KeeBak commented 3 years ago

Hi, I'm really interested in using this tool! I am however new to this sort of analysis and so was hoping you could help with the basics. I have integrated my sample as in the seurat vignette https://satijalab.org/seurat/articles/integration_introduction.html and have now my seurat object "immune.combined". I am now following your tutorial to identify my da regions and have errors.

get label info

head(immune.combined)

labels_res <- immune.combined[immune.combined$stim == "STIM", "label"] labels_nonres <- immune.combined[immune.combined$stim == "CTRL", "label"]

head(immune.combined) Warning: The following arguments are not used: drop An object of class Seurat 12 features across 25152 samples within 2 assays Active assay: integrated (6 features, 6 variable features) 1 other assay present: RNA 2 dimensional reductions calculated: pca, umap

labels_res <- immune.combined[immune.combined$stim == "STIM", "label"] Error in [.Seurat(immune.combined, immune.combined$stim == "STIM", "label") : Incorrect number of logical values provided to subset features labels_nonres <- immune.combined[immune.combined$stim == "CTRL", "label"] Error in [.Seurat(immune.combined, immune.combined$stim == "CTRL", "label") : Incorrect number of logical values provided to subset features

any help would be greatly appreciated!

JunZhao1990 commented 3 years ago

Hi @KeeBak , thank you for your interest in DAseq!

I think you could try the following.

labels_res <- immune.combined$orig.ident[immune.combined$stim == "STIM"]
table(labels_res)
labels_nonres <- immune.combined$orig.ident[immune.combined$stim == "CTRL"]
table(labels_nonres)

Basically, you need to check what meta.data columns are available in this object first and then go from there. Hope this is helpful.