Help on R code to identify specific cells expressing lefty1 or lefty2

@mmccoy @LindsayHayes @cpozmanter
Last semester I analyzed the gene expression of Lefty1 and Lefty2. I focused on the differential expression of each within celltypes and found that they were both expressed in the definitive endoderm and nascent mesoderm at one point during gastrulation. From there I wanted to focus on whether they were both expressed within the same cells, rather than the same celltypes. I left off with this graph…



The dots on the y-axis are cells that only have Lefty2 and the dots on the X-axis are cells that only hold Lefty1. Everything in between are cells that have different expression levels of either gene. I’m now interested in finding a code that identifies these cells.
I have a copy of my R notebook under the c_moor_ccc_su22_public folder.

1 Like

It’s great that you still want to keep working on this! You can filter the cells that express both Lefty1 and Lefty2. Here is one way to identify the cells:

data.df <- tibble(
    cell = sce$cell,
    geneA = logcounts(sce)[gene_A,], 
    geneB = logcounts(sce)[gene_B,]) %>% 
  filter(
    geneA > 0,
    geneB > 0)
coi <- colData(sce)$cell[colData(sce)$cell %in% data.df$cell]
1 Like