I am relatively new to Bioinformatics and scRNA-seq data analysis. I am using Seurat V3 to analyze a scRNA-seq dataset in R. Currently, I have merged three scRNA-seq samples from the same donor into one Seurat object, All_Samples. We'll call them:
All_Samples <- merge(x = Uninfected, y = c(Virus1, Virus2))
Uninfected cells did not receive virus (i.e. express no viral genes), the other two samples were infected with a virus introducing new genes into the cells. I would like to accomplish two things.
First: I want to create a new Ident for Virus1 and Virus2 samples based on expression of a viral gene of interest: "GeneA". All cells from Virus1 and Virus2 samples that have "GeneA" expression > 0.5 would be labeled "Pos", those with "GeneA" < 0.5 would be labeled "Neg" in a the new Column called GeneA.
I am able to subset the objects based on GeneA expression that applies to all samples in the object. For example:
All_Samples_GeneA_Pos <- subset(All_Samples, subset = GeneA > 0.5) All_Samples_GeneA_Neg <- subset(All_Samples, subset = GeneA < 0.5)
Second: Once I have separated the data from Virus1 and Virus2 into "Pos" and "Neg" cells for "GeneA", I want to look for differentially expressed genes between all Uninfected cells and "Pos" cells from Virus1 or Virus2. I have been using something like this to compare samples:
FindMarkers(object = All_Samples, group.by = 'virus', ident.1 = "1", ident.2 = "2")
But how would I do something equivalent to this:
FindMarkers(object = All_Samples, ident.1 = "Uninfected", ident.2 = "Virus1_GeneA_Pos")
FindMarkers(object = All_Samples, ident.1 = "Uninfected_GeneA_Neg", ident.2 = "Virus1_GeneA_Pos")
Let me know if I can clarify any points. I appreciate any help!