use strict; use warnings; while (<>) { if (/^DE|^GN|^ID/) { my $lines = $_; if ($lines =~ /^DE|^GN/ && $lines !~ /Putative uncharacterized + protein/) { my @pairs = $lines =~ /(.+?=.+?;)/g; for my $pair (@pairs) { if ($pair =~ /=(.+);/) { print lc($1), "\n"; } } } elsif ($lines =~ /^ID/) { print " \n"; } } } __END__ adp-ribosylation factor 1 arf1 arf, plarf
In reply to Re: how to parse a UniProt Flat file
by toolic
in thread how to parse a UniProt Flat file
by stanleysj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |