Sorry for not writing a detailed description of what i am working on. So i have thousands of files in a tab delimited format saved in one folder.
Each file has a format of 2000 by 10 table
What i want to do right now is create new file with the data i want.
So the format of each file follows ..
Gene exp1 exp2 exp3 exp4 ...
1 1050 2020 100 100
2 100 100 100 100
3 224 11 11 11
4 11 15 555 444
5 22 51 55 555
6 55 55 55 555
From the first file i read, I want to extract two columns for example I want 'Gene' and 'exp4' columns and put it in a new file.
And from the rest of the other files, I want to extract 'exp4' column only and add on the right side of the two columns i extracted from the first file.
So the final format would look like
Gene file1 exp4 file2 exp4 file3 exp4 file4 exp4....
1 100 200 155 144
2 22 55 222 444
So it will have a 2000 by thousands(number of my files) table as a result.
I am a beginner in programming and especially in perl.
help me please..
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||