diff --git a/biostools/analyzers.py b/biostools/analyzers.py index b10262f..297f188 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -1914,7 +1914,7 @@ class MylexAnalyzer(Analyzer): def __init__(self, *args, **kwargs): super().__init__('Mylex', *args, **kwargs) - self._version_pattern = re.compile(b'''MYLEX ([\\x20-\\x7E]+) BIOS Version ([\\x20-\\x7E]+) ([0-9]{2}/[0-9]{2}/[0-9]{2})''') + self._version_pattern = re.compile(b'''MYLEX [\\x20-\\x7E]+ BIOS Version ([\\x20-\\x7E]+) ([0-9]{2}/[0-9]{2}/[0-9]{2})''') def can_handle(self, file_path, file_data, header_data): # Determine location of the identification block. @@ -1923,13 +1923,13 @@ class MylexAnalyzer(Analyzer): return False # Extract version. - self.version = match.group(2).decode('cp437', 'ignore') + self.version = match.group(1).decode('cp437', 'ignore') # Extract date as a string. - self.string = match.group(3).decode('cp437', 'ignore') + self.string = match.group(2).decode('cp437', 'ignore') - # Extract board name as a sign-on. - self.signon = match.group(1).decode('cp437', 'ignore') + # Extract full version string as metadata. + self.metadata.append(('ID', match.group(0).decode('cp437', 'ignore'))) return True