f4enix.output.fispact_legacy_out.PathwayCollection#
- class f4enix.output.fispact_legacy_out.PathwayCollection(pathways: list[Pathway])#
Bases:
objectCollection of pathways. This can be created from a list of Pathway objects or directly from a FISPACT legacy output file.
- Parameters:
pathways (list[Pathway]) – list of Pathway objects.
- Variables:
pathways (list[Pathway]) – list of Pathway objects.
Examples
>>> from f4enix.output.fispact_legacy_out import PathwayCollection ... collection = PathwayCollection.from_file("path/to/fispact/output") ... pathway = collection.pathways[0] ... print(pathway) ... print(pathway.parent, pathway.daughter, pathway.reactions, ... patway.intermediates, pathway.perc) Mn55 -(n,g)-> Mn56 Mn55 Mn56 ['n,g'] None 100.0
Methods
__init__(pathways)Collection of pathways.
from_file(file)Retrieve pathways from a FISPACT legacy output file and return a list of Pathway objects.
Return the pathways as a pandas DataFrame.
- classmethod from_file(file: PathLike) PathwayCollection#
Retrieve pathways from a FISPACT legacy output file and return a list of Pathway objects.
- Parameters:
file (os.PathLike) – The path to the legacy FISPACT output file.
- Returns:
A list of Pathway objects representing the pathways found in the file.
- Return type:
list[Pathway]
- to_dataframe() DataFrame#
Return the pathways as a pandas DataFrame. columns are “Parent”, “% contribution”, “Intermediates”, “Reactions”, “Daughter”.
- Returns:
The pathways as a pandas DataFrame.
- Return type:
pd.DataFrame