This looks suspicously like bioperl territory. and you are looking at something of an app here. download bioperl. read the docs. think about the problem space.
Thanks a lot, I already know bioperl and its packages. There is no package in bioperl to treat that. I'm posting in perlmonks to "seek perl wisdom" on that issue.