Reverse Complement utility

Keith James k.james at bangor.ac.uk
Wed Aug 6 04:29:19 EST 1997

Keith James <k.james at bangor.ac.uk> writes:

> Ignore this if you don't have Unix (or Windows + win32-Perl + Cygwin32 GNU
> fileutils). If you have Perl available you can do:
> perl -ln0e 'tr/ACGTNacgtn- /TGCANtgcan/d; print scalar reverse $_;' <infile

Perhaps I should put my brain in gear before engaging my keyboard. The
line should be:

perl -l012n00e 'tr/ACGTacgt /TGCAtgca/d; print scalar reverse $_;' <in

This has the required effect, deals with linebreak characters properly and
removes the spaces introduced during the process. My apologies for the

Keith James Ph.D. - k.james at bangor.ac.uk  PGP 2.6.2i  Key ID 469A9FA1
Biodegradation Group                         *Encrypt and Survive*  
School of Biological Sciences    Guvf znl znxr ab frafr vs bar bs gur
University of Wales, Bangor, UK  vasvavgr ahzore bs zbaxrlf vf bssyvar

More information about the Bio-soft mailing list

Send comments to us at biosci-help [At] net.bio.net