[Bioperl-l] removing duplicate fasta records

Ewan Birney birney@ebi.ac.uk
Wed, 18 Dec 2002 08:59:47 +0000 (GMT)

> perl -ne 'BEGIN{$/=">";$"=";"}/(.*?)\n(.+?)\s*>?$/s && push
> @{$h{$2}},$1;END{for(keys%h){print ">@{$h{$_}}\n$_\n"}}'
> Which will remove redundant entries AND concatenate their description
> lines :-)


The reason I love perl was the elegance of Lincoln's five liner, using
just the right amount (and no more) of CPAN modules to process data. It
was almost Haiku like.

The reason I ... despair .... of Perl is the ability to write things like
this (no offence Paul - I am sure you wouldn't write something like that
in a script using a production setting would you ;) ).

My Love-Hate relationship with Perl just deepens.

> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l