Merging files with gene expression data
1
0
Entering edit mode
BioinfGuru ▴ 70
@yagalbi-11519
Last seen 3 months ago
Ireland

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

 

merge rnaseq files • 2.2k views
ADD COMMENT
0
Entering edit mode
@jaymerickman-11439
Last seen 8.3 years ago

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 COMMENT

Login before adding your answer.

Traffic: 883 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