Skip to content

Commit

Permalink
Changed KEGG ID regex
Browse files Browse the repository at this point in the history
Some organism prefixes have a length other than 3 letters (e.g. pall:UYA_22060)
  • Loading branch information
iquasere committed Jan 4, 2024
1 parent bce857a commit 9f4fbe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keggcharter.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def read_input_file(args: argparse.Namespace) -> pd.DataFrame:
if col not in result.columns:
sys.exit(f'"{col}" column not in input file! Exiting...')
patterns = {
"kegg_column": (r"^[A-Za-z]{3}:.+$", 'tax_id:KEGG_ID'),
"kegg_column": (r"^[A-Za-z]+:.+$", 'tax_id:KEGG_ID'),
"ko_column": (r"^K\d{5}$", 'KXXXXX'),
"ec_column": (r"^(\d+)(\.(\d+|-)){2}(\.(.*))?$", 'X.X.X.X'),
"cog_column": (r"^COG\d{4}$", 'COGXXXX')
Expand Down

0 comments on commit 9f4fbe9

Please sign in to comment.