in reply to Re: find reverse complement of every 2nd line
in thread find reverse complement of every 2nd line
Hey Dave. For the reverse complement the code will be something like this
my $raw=<IN>; $rev= reverse $raw; $rev=~tr/ATGCatgc/TACGtacg/;
my problem actually is doing this only to every other line and not the entire file
this is what i came up with, but it doesnt work
while(@inf=<IN>) { if(i%2==1) { $inf[i]=reverse $inf[i]; } }
In this i was just trying to find the reverse to see if this code performs the action on the lines I want it to.. but no luck. Im still thinking of any other way. Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: find reverse complement of every 2nd line
by LanX (Saint) on Jul 09, 2013 at 23:27 UTC | |
|
Re^3: find reverse complement of every 2nd line
by syphilis (Archbishop) on Jul 09, 2013 at 23:40 UTC |