Question: How to transform my TCGA data into this?
0
gravatar for Dr.Napoleon
7 months ago by
Dr.Napoleon0 wrote:

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 • 229 views
ADD COMMENTlink modified 7 months ago • written 7 months ago by Dr.Napoleon0
1

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 REPLYlink written 7 months ago by ATpoint31k

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

ADD REPLYlink written 7 months ago by Dr.Napoleon0

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 REPLYlink written 7 months ago by Konstantinos Yeles100

Very appreciated it! I will read this chapter

ADD REPLYlink written 7 months ago by Dr.Napoleon0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1186 users visited in the last hour