How to transform my TCGA data into this?
0
0
Entering edit mode
4.7 years ago

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
R • 1.3k views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Thank for your suggestion! As bioinformatic rookie, these basis problems confused me a lot.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Very appreciated it! I will read this chapter

ADD REPLY

Login before adding your answer.

Traffic: 3107 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6