nifty

nkuipers nkuipers at uvic.ca
Tue Mar 4 17:18:59 CST 2003


Peter in particular may recall a problem I had way back, trying to figure out 
how to write an arbitrarily long sequence string to a specific format as 
follows:

>description
60 chars of sequence
60 chars of sequence
etc.

We should both kick ourselves for not looking in the Camel for "wrapping 
text"...see page 866 or this handy working summary that I now use: :)

#!/usr/bin/perl

#write Fasta using a standard module, no bioperl yay!

use Text::Wrap;
$Text::Wrap::columns = 61; #includes terminal \n

print $fh ">$description\n";
print $fh wrap('', '', $sequence_string."\n");

I just thought that was amusing to discover just now.

Cheersies,

Nathanael




More information about the Victoria-pm mailing list