Differentially expressed genes analysis in Seurat
I'm not quite sure what you are asking, but you can use anything in the metadata as a grouping with FindMarkers.
DefaultAssay(combined.all) &lt;- &quot;RNA&quot;
Idents(combined.all) &lt;- &quot;orig.ident&quot;


for (sample in unique(Idents(combined.all))) {
  clustermarkers &lt;- FindMarkers(combined.all, ident.1 = sample)
  print(paste(&quot;Cluster&quot;, sample))
  print(head(clustermarkers, n = 10))
}