Do you know where your variables are? | |
PerlMonks |
How does one get only the non-redundant (non-repeating) entries with header?by supriyoch_2008 (Monk) |
on Jul 17, 2014 at 11:28 UTC ( [id://1094017]=perlquestion: print w/replies, xml ) | Need Help?? |
supriyoch_2008 has asked for the wisdom of the Perl Monks concerning the following question: Hi PerlMonks, There are four samples (sample1...sample4) each with a different name. Sample 1 & 2 have the same sequence i.e. ATGC. Likewise, sample 3 & 4 have same sequence i.e. CCGG. My interest is to retain only the sample 1 with sequence ATGC and reject sample 2 as the latter shares the same sequence with sample 1. Same is the case for sample 3 & sample 4 i.e. I wish to retain sample 3 and reject sample 4. I am at my wit's end to fix this problem. I am looking forward to suggestions from perl monks regarding this problem. I have written a script t2.pl (given below) to separate the header and the sequence. Here goes the script:
I have got the results like:
But the expected results should look like:
Back to
Seekers of Perl Wisdom
|
|