Question: Summing data from 3 different parts of an R object at once
1
gravatar for cook.675
15 months ago by
cook.67560
cook.67560 wrote:

I have 3 replicate samples from a scRNA seq experiment; call them V1, V2, V3. I merged them into one large object "Object". When I merged them I appended the replicate name to the column barcodes, for example V2_ATGGAGTGGAT etc...

Object has a meta data column for cell cycle state located at Object$"Phase" . These are either "G1", "G2M", or "S; The Object also has cluster information that is located at Object$"seurat_clusters"

What I want to do is; for each replicate sum the number of cells in cluster x that are in cell phase "y"

So for example: For V1, sum the number of cells in G1 that are in cluster 1. Then I will repeat this for all clusters and cell phases and replicates to plot some data.

I can get the cluster and phase cell sum here: V.G1 <- sum(Object$"Phase" == "G1" & Object$"seurat_clusters" == 0)

But its not clear how to specify the replicate identifier for this operation?

Thanks!

seurat scrna seq R • 295 views
ADD COMMENTlink modified 13 months ago by Biostar ♦♦ 20 • written 15 months ago by cook.67560
0
gravatar for cook.675
15 months ago by
cook.67560
cook.67560 wrote:

guys I got it!!!

X <- sum(Object$orig.ident == "V1" & Object$"Phase" == "G1" & 
          Object$"seurat_clusters" == 0)
ADD COMMENTlink written 15 months ago by cook.67560
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2100 users visited in the last hour
_