With the first column being genes, the second being the condition, the third being the replicate number and the fourth being the relative gene expression. So I have about 15 000 genes tested, with three conditions (alpha, beta and low) and about between 11-13 replicates per condition (13 alpha, 11 beta and 11 low).
I want to change the format so along the top I have the 35 replicates along the top (i.e. the 13 alpha, 11 beta and 11 low), the genes down the side as they already are a FPKM value for each individual for each gene, something as follows
My knowledge of coding is v limited, so if someone could help me, either with a Perl script or a simple UNIX command line script, that would be really great.
Thanks!
Edit: I've added in a screen shot of the input (on the right) and what I want the output to look like. I did it in excel to make it a bit easier to see the columns, but I have them in text files too.
input
output example. all the rows should look like the first two - i just had to add in a few spaces so they lined up correctly. and i just randomly added in the values into the table, but in the ouput they need to correspond to the FPKM values on the input.
Welcome to forums, thank you for using code tags for Inputs you have shown us in your 1st post. Also for RudiC's script yes you could run it as a command line command as well as you could make a script.ksh OR .sh OR .awk with proper permissions and can run it too. Also as always on a Solaris/SunOS system, change awkto /usr/xpg4/bin/awk , /usr/xpg6/bin/awk , or nawk.
Thanks that's worked I think. Would it be possible to maybe make it so that it copies the results into a text file, because i can't seem to copy and paste the terminal output into a word file because it's so many lines long. Thanks!
Good morning all, I have a machine running IRIX and I need to edit a text file on the terminal that is literally thousands of lines. Does anyone know the most efficient way to edit portions of files like these? Obviously simply using the vi command isn't going to work since I get a too many lines... (1 Reply)
Hello All,
I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly.
Is there any way to take the output from the cat... (7 Replies)
Dear Guru's
I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response.
Srini (6 Replies)
I have a text file that has data like:
Data "12345#22"
Fred
ID 12345
Age 45
Wilma
Dino
Data "123#22"
Tarzan
ID 123
Age 33
Jane
I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes:
Data "1012345#22"
Fred
ID... (16 Replies)
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
Mac OS X 10.6: Leopard - I'm trying to create a script that will run on its own that can edit system preferences. I've done some digging, and found that a lot of system preference options are controlled by .plist files in ~/library/preferences, /library/preferences, and... (1 Reply)
Is there any way to erase all the contents of a specific line of a text file and then write something on it?
e.g.
test.txt.old:
qwert
asdfg
zxcbv=0
test.txt.new
qwerty
asdfg
hello=0
is this possible with C++ ?:confused: (1 Reply)
I want to have a terminal open and have something like a "repeating cat" command running in it for a certain text file (in particular /var/log/system.log). So my terminal will scan or cat the text file every so often or whenever the text file system.log gets written to by the system, it will... (1 Reply)
Hi, I need some help in text manipulation.
I have an input file like this:
7629 "WPCW 19 - CW/AM1, WPCB 40 - FAMN/CORNER, WPCB-DT1 50 - FAMN/CORNER, "
W35AW - Various Shopping Pgms
W41CF - TBN
W47CV - TBN
WLLS-LP 49 - AM1
WATCH WPXI 11 N & WPIX 11 CW
1234 "WPCW 19 - CW/AM1,... (26 Replies)