o
    Rŀgj                     @   s   d Z ddlmZ dd ZdS )a5  Load KEGG Pathway maps for use with the Biopython Pathway module.

The pathway maps are in the format::

    RXXXXX:[X.X.X.X:] A + 2 B <=> C
    RXXXXX:[X.X.X.X:] 3C <=> 2 D + E
    ...

where RXXXXX is a five-digit reaction id, and X.X.X.X is the optional
EC number of the enzyme that catalyze the reaction.
    )Reactionc              
   c   s    | D ]t}| d\}}}|fg}i }| d\}}| d}|D ]#}	|	 }	z|	  \}
}	t|
 }
W n ty?   d}
Y nw |
||	< q!| d}|D ]"}	|	 }	z|	  \}
}	t|
}
W n tyi   d}
Y nw |
||	< qLt||d|V  qdS )zParse a KEGG pathway map.:z<=>z +    TN)splitstripint
ValueErrorr   )handlelinedata	catalystsreaction	reactantsbeforeafter	compoundscompoundnumber r   I/var/www/html/myenv/lib/python3.10/site-packages/Bio/KEGG/Map/__init__.pyparse   s8   



r   N)__doc__Bio.Pathwayr   r   r   r   r   r   <module>   s   