Seurat to Dataframe with ONLY counts, cells, and cluster labels?

1

I'm trying to run MDSeq, which appears to require a plain old data frame - counts and cells, and with labels for conditions (in my case, it'll be clusters found from Seurat's clustering).

I'm completely lost as to what function, if any, could strip all data/metadata except for the 3 above, and then convert it into a dataframe?

Alternatively, I am using the below script to split it into dataframes for each cluster, could/should I combine these and retain/add cluster labels? Seems less elegant than the other approach.

cluster_list <- levels([email protected])

for(cluster in cluster_list) {
  name <- paste("data_cluster_", cluster, sep="")
  clustersubset <- subset(data_transcripts_seurat, idents=cluster, slot="counts")
  assign(name, as.data.frame([email protected][email protected]))
}


R


RNA-Seq


Seurat

• 573 views



Source link