I have a file and i need to find the reverse complement only of every 2nd line- basically of every even line. How do i go about it?

Here"s what the file looks like

@HWI-ST1023:184:C1V8LACXX:7:1101:1142:2247 2:N:0:TGACCA GTAGGGGCTGCGCGAACGCAAACCCCCGCTGCCACAAATGATCGTCGGACTGTAGAACTCTGAACGTGTA +GATCTCGGTGGCCGCCGTATCATTAAAAAAA + ?1=DBB@DCFFFFIGIIII6DGHHIII6@=AEEDDEEC;@C>@?(;;B;@B?9BCDAA3>(:@@CB+8(9 +>@:@CCBB289(259@B9B8?A:@C@>CC@B @HWI-ST1023:184:C1V8LACXX:7:1101:1450:2022 2:N:0:TGACCA ACGTGCCCTCGGCCAGAAGGCTTGGGGCGCAACTTGCGTTCAAAGACTCGATGGTTCACGGGATTCTGCA +ATTCACACCAAGTATCGCATTTCGCTACGTT + ?@@DDDFFADFFHIJIIFG>FHIJJJJJGIIBH=DHGHHDDFFF;AEAC?=>CD-:@CDBDBDBDD>CDD +D:ACDCDDDDD?(4>CBBD?@DDDDDDDD8? @HWI-ST1023:184:C1V8LACXX:7:1101:1457:2047 2:N:0:TGACCA GCGTCGCCAGCACAGAGGCCATGCGATCCGTCGAGTTATCATGAATCATCAGAGCAACGGGCAGAGCCCG +CGTCGACCTTTTATCTAATAAATGCGTCCCT + @CCDFFFFGHHHHJIIIJJIJJJJIIJJJJFHIBFBFHIGJJIGI@GHGGEHHHHHHFFDDABDDDDDDD +DDDDBDBBBDCCCCCDDDDCDDEECB8<@DD @HWI-ST1023:184:C1V8LACXX:7:1101:1476:2196 2:N:0:TGACCA GATTGGGGCTGCATTCCCAAACAACCCGACTCGTAGACAGCGCCTCGTGGTGCGACAGGGTCCGGGCACG +ACGGGGCTCTCACCCTCTCTGGCGCCCCTTT + C@CFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJGHIIGEGGIJJIIICHH?@DDCDDBDD9CDBBDDDDD +BDDDDDDDDDCDDDD?BCDCCCDD@BDDDDD

Thanks in advance guys

EDIT

I'm facing specific problems in performing the reverse complement only on every other lines.

Actually I need to find reverse complement of every second line and JUST THE REVERSE of the fourth line


In reply to find reverse complement of every 2nd line by bingalee

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.