Skip to content

Finding markers of all cluster using a loop #4027

Discussion options

You must be logged in to vote

Hi @arturomarin,

I do something similar like this all the time.

Try this:

for (i in AllClus) {
  DefaultAssay(immune.combined) <- "RNA"
  gmarker.markers <- FindConservedMarkers(immune.combined, ident.1 = i, grouping.var = "Condition", verbose = FALSE)
  assign(paste0("g", i, ".markers"), gmarker.markers)
  }
#cleanup environment
rm("gmarker.markers", "AllClus")

Hope this helps!

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@arturomarin
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by arturomarin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants