Entering edit mode
5.0 years ago
David_emir
▴
500
Hi All,
I have an RNAseq gene expression file (Count data) as follows, I need to conduct a Differential gene expression analysis between Patients, for that, I need to have this file as a Matrix of Rows as Genes and columns as counts (samples), how best can I get this as matrix file?
Thanks a lot for your help, Stay safe
Dave

You'll need to use something like
tidyr::pivot_wider()to getpatient_idto columns and retaingene_codeas rows. You'll end up picking one ofgene_raw/gene_tpmas the values.Thanks a lot, RamRS, it's such a great help. Going forward, I have tried your solution and used the following code
but i m not getting the desired output, please let me know where i am going wrong. thanks again.
What is the output you're getting? Also, please give us the output to:
dput(head(bulk, 25)).Hello David_emir!
It appears that your post has been cross-posted to another site: https://bioinformatics.stackexchange.com/questions/14734/gene-expression-table-to-expression-matrix-converstion
This is typically not recommended as it runs the risk of annoying people in both communities.
Thanks you RamRS will keep that in mind.