This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to add gene names to DGEList and convert to csv? gro-seq groHMM

I am trying to get expression information from groSeq using groHMM. Following their tutorial, I end up with a DGEList that doesn't contain gene names, just counts. The row.names are numbered 1,2,3 etc. I have the gene names in kgLimit$symbol. How can I export the DGEList with row.names set to gene names as a csv or tsv?

Thanks a million,

Simon

rna-seq groseq grohmm

1 answer

Will answer in case someone stumbles upon this in the future:

#for your DGElist, kgLimit
counts <- as.data.frame(kgLimit$counts)

row.names(counts) <- kgLimit$symbol
#this may need to be as.vector(kgLimit$symbol), I'm not good enough with R to know off the top of my head

write.csv(counts,"Path where you'd like to export the DataFrame\\File Name.csv", row.names = TRUE)

This may not be the best way to do it but I think it would be the job done. If anyone knows of a better way I'd love to hear it!

Log in to answer this question.