I have 2 text files (tab delimited). The 1st file is the main file and the 2nd one is made from the 1st file. The main file looks like this:
Rownames IDs SAM5511 SAM5566 1 EGS001 2 23 . . 550 ESF012 3 76 . . 1001 EFP125 4 55
And the 2nd one looks like this:
X log p-val 1 4.5 0.001 550 2.3 0.021 1001 1.6 0.0005
I filtered the 1st file and changed the values to get the 2nd file so the number of rows in the 2nd file is less than the 1st one. As you see in the 1st file the 1st column is IDs but that of 2nd file is is the row names of 1st file (since it is filtered, all the rows are not included in the 2nd file). I want to make a text file like the 2nd file but it also has the corresponding IDs from the 1st file and it would be like this:
IDs X log p-val EGS001 1 4.5 0.001 ESF012 550 2.3 0.021 EFP125 1001 1.6 0.0005