Question: Merging files with gene expression data
0
gravatar for YaGalbi
2.7 years ago by
YaGalbi20
MRC Harwell Institute, Oxford, UK
YaGalbi20 wrote:

Hi all,

This seemed like such an easy task, yet I am boggled.

 

I have:

28 files: each named n.txt , where n is a type of tissue (e.g. cortex.txt, heart.txt)

Each file contains 2 columns and the column headers are gene name (column 1) and log2rpkm (column 2)

Each file contains around 30-40k rows

 

I need:

To merge the files into one file with 29 columns

Headers: genename, tissue1, tissue2, tissue3, etc.... to tissue28

So that each row contains one gene and its expression value in the 28 tissues.


With that I can convert it to a matrix in R and quantile normalise it for tissue specificity calculations

 

Thanks in advance for your help,

 

Kenneth

 

rnaseq merge files • 479 views
ADD COMMENTlink modified 2.7 years ago by jayme.rickman0 • written 2.7 years ago by YaGalbi20
Answer: Merging files with gene expression data
0
gravatar for jayme.rickman
2.7 years ago by
jayme.rickman0 wrote:

I think you likely are looking for the merge function.  Much like Cbind it can bind by columns.  Unlike that it matches them based on matching values (so if in one file the APC gene is like 2 and in the other it is like 400 it can figure that out).

The function information is here:https://stat.ethz.ch/R-manual/R-devel/library/base/html/merge.html

ADD COMMENTlink written 2.7 years ago by jayme.rickman0
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 16.09
Traffic: 137 users visited in the last hour