[Bioperl-l] StandAloneFasta::version

Nathan S. Haigh n.haigh at sheffield.ac.uk
Mon Nov 6 15:29:23 EST 2006


Hi Sendu,

I've written a version method for StandAloneFasta.pm. However, because
of the way in which FASTA is versioned, it makes for difficult version
comparisons i.e. they contain non-numeric characters e.g. 3.4t26.

I have employed a private function that does a conversion of the
non-numeric characters into their ascii value representation to build a
float. e.g. the above version would result in: 3.411626 which can then
be compared easily. At the moment, this is accessed via
$factory->version like other modules as this will give access to a
version number that is easily comparable. However, should there be a
different function to return the unconverted version string e.g. 3.4t26?
Or should there be a function that does a compare internally so it can
be accessed something like:
print "we have met the min version requirement\n" if
$factory->at_least_version('3.4t26');

Ideas welcome!
Nath



More information about the Bioperl-l mailing list