I want to define the identity of some cells based on a gene marker (for example the colour yellow< EYFP gene). One group of cells has the EYFP gene the other doesn't and I want to find the differential gene expression between those groups that are found on the same cell sample. Do you have any tips for a code in Seurat? Thanks


1 Answer 1


Take a look at the section "Finding Differentialy Expressed Feautres (cluster biomarkers)" of Seurat tutorial.

You have to define your clusters (if not computed automatically) by modifying the ident slot of the Seurat object.

Then you call the function FindMarkers of your Seurat object (to define markers of a given cluster against the rest) or FindAllMarkers (to look for all the combinations)

  • $\begingroup$ How can I modify the ident slot based on a gene and not on a cell population ? $\endgroup$ Commented May 21, 2019 at 7:56
  • $\begingroup$ You should decide which cells express your EYPF marker and then give this information to the ident slot. $\endgroup$
    – plat
    Commented May 21, 2019 at 8:41
  • $\begingroup$ The cells are dispersed all over the tSNE plot and are not within a specific cell cluster. How do I group them together> $\endgroup$ Commented May 21, 2019 at 12:44
  • $\begingroup$ You can create your own clusters/grouping by expression. For instance, all the cells that express more than 10 molecules of EYPF you assign them to a group and the rest to other. This has nothing to do with the tSNE plot at the end, is a matter of grouping cells by expression of a marker gene. Then you assign the manual clusters that you have created via the ident slot and perform differential expression. $\endgroup$
    – plat
    Commented May 21, 2019 at 13:29
  • $\begingroup$ I am new to this and don't know the exact syntax. Could you provide a specific code for defining the ident slot, please? That would be very helpful, thanks $\endgroup$ Commented May 21, 2019 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.