#assign the lists of row numbers for different clusters to a variable gene.numbers
gene.numbers = as.matrix(split(1:length(sotaCl[["clust"]]), sotaCl[["clust"]]))
#Unlist the row nambers for individual clusters ( for example cluster 4)
cluster4 = (unlist(gene.numbers[4]))
#add gene names (rownames) in additional column to the expression matrix
raw.counts_merged_rep$names <- rownames(raw.counts_merged_rep)
#obtain a table with both expression values and rownames (genes) for cluster 4
cl4_table = filter(raw.counts_merged_rep, row_number() %in% cluster4)
Hi genomax,
I hope not. I was working with clValid and sota clustering on Friday. Found this answer very helpful but expanded on it, so it can be directly used to get not only the row.numbers of genes in clusters but also the gene names.
Dear Dario Garvan
Thank you very much!