in reply to Re^2: Private Utilities
in thread Private Utilities
no problem!! round robin is fine - here is a way I have done it in a liner without having to read the entire file into mem (just an example) :
example usage:# Choose first N FASTA records perl -ne 'BEGIN {$/=">";$o=0}{chomp;$o<N?(/^$/?next:print">$_"):last;$ +o++}' EXAMPLE.fa
perl -ne 'BEGIN{$/=">";$o=0}{chomp;$o<22?(/^$/?next:print">$_"):last; +$o++}' b4x_est100.fa # print the first 22 records
In Section
Meditations