This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Run CCA in Seurat

I'm running CCA and I don't know why an error occurred in MergeSeurat. Any help is appreciated. Here's my code:

g.1 <- head(rownames(ctrl@hvg.info), 1000)
g.2 <- head(rownames(stim@hvg.info), 1000)
genes.use <- unique(c(g.1, g.2))
genes.use <- intersect(genes.use, rownames(ctrl@scale.data))
genes.use <- intersect(genes.use, rownames(stim@scale.data))
asthma.combined <- RunCCA(ctrl, stim, genes.use = genes.use, num.cc = 30)
Running CCA
Merging objects
Error in MergeSeurat(object1 = object, object2 = object2, do.scale = FALSE,  : 
Duplicate cell names, please provide 'add.cell.id1' and/or 'add.cell.id2' for unique names
  
r rna-seq

The error message is quite clear:

Duplicate cell names, please provide 'add.cell.id1' and/or 'add.cell.id2' for unique names

Add the arguments add.cell.id1="ctrl",add.cell.id1="stim" to your RunCCA call. This will append these onto your ids.

You probably mean add.cell.id1="ctrl",add.cell.id2="stim", no?

0 answers

No answers yet.

Log in to answer this question.