Thanks for the reply basically the problem is that I do not need most of the fields contained in file 1 and most of the fields in file 2
Few lines of file1:
169: rs60465173 has merged into rs8057341
Homo sapiensCAGCTGACTGAGGCAGCGGGAGTTGA
A/GAAGAAACGATATTAGTTCATGGTGA
ABI, AFFY, ILLUMINA-UK, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA170: rs17312781 has merged into rs8057341
Homo sapiensCAGCTGACTGAGGCAGCGGGAGTTGA
A/GAAGAAACGATATTAGTTCATGGTGA
ABI, AFFY, ILLUMINA-UK, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA171: rs8057341
Homo sapiensCAGCTGACTGAGGCAGCGGGAGTTGA
A/GAAGAAACGATATTAGTTCATGGTGA
ABI, AFFY, ILLUMINA-UK, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA, ILLUMINA172: rs60162986 has merged into rs8046608
Homo sapiensCCCTACTTACTTGTGGCCTGTCCCCT
C/TGTGAATGTGTCTCATGTCCCCAGTG
AFFY173: rs8046608
Homo sapiensCCCTACTTACTTGTGGCCTGTCCCCT
C/TGTGAATGTGTCTCATGTCCCCAGTG
From there I need the rs value. And for this I made the code I wrote about. Now I have rs values in an array and I need to grab only the lines which contain the rsnumbers from a second huge txt file (1 GB)
The second file looks like
First row XXX XXX XXX XXX XXX XXX XXX XXX (1050 cells)
rsnumber AA AG AG AG AA AG AG AG (1050 times)
rsnumber TT AT AA AT AT .....
500 times more
I need to get from this file the rsnumbers stored in the array from file 1 toghether with the 1050 values on the string
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.