Entering edit mode
5.4 years ago
Dr.Napoleon
•
0
I have downloaded TCGA miRNA isoform expression data, and got this data after few steps,i wonder if anyone knows how to transform my data into this ideal form (each SampleID as colnames). thanks a lot!
my data
SampleId miRNA_ID x
1 TCGA-2K-A9WE-01A-11R-A38N-13 hsa-let-7a-1 7817.009
2 TCGA-2Z-A9J1-01A-11R-A38N-13 hsa-let-7a-1 5915.546
3 TCGA-2Z-A9J2-01A-11R-A38N-13 hsa-let-7a-1 3632.037
4 TCGA-2Z-A9J3-01A-12R-A38N-13 hsa-let-7a-1 6020.645
5 TCGA-2Z-A9J5-01A-21R-A38N-13 hsa-let-7a-1 7183.899
6 TCGA-2Z-A9J6-01A-11R-A38N-13 hsa-let-7a-1 6786.363
ideal form
TCGA-2K-A9WE-01A-11R-A38N-13 TCGA-2Z-A9J1-01A-11R-A38N-13
1 hsa-let-7a-1 7817.009 5915.546
This is basic R data handling, I suggest you try out some things as you will need this skill regularily in your career, also to filter out things you are interested in after your analysis.
Thank for your suggestion! As bioinformatic rookie, these basis problems confused me a lot.
You could use tidyverse to do these manipulations, I suggest you to read this: https://r4ds.had.co.nz/introduction.html In the 5th chapter, you will find easy ways to do it. As @ATpoint mentioned, you will need these skills if you are going to work as a bioinformatician/data analyst. Tips : spread/gather functions from tidyverse/tidyr will help you do what you want.
Very appreciated it! I will read this chapter