Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
ovitrac committed Mar 8, 2025
1 parent 76c5f82 commit 4011f32
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions patankar/cache.ToxTree/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ToxTree Cache for SFPPy ๐Ÿโฉ๐ŸŽ

This directory is managed by `patankar.private.loadpubchem.migrantToxtree` and serves as a **local cache** for toxicological assessments performed using **Toxtree**. It helps optimize repeated evaluations by storing results locally, allowing for faster access usage (even on machines without ToxTree).

## ๐Ÿ“ Folder Contents

- `cidXXXX.default.csv` ๐Ÿ“„: **Base Toxtree evaluation** (always generated for each compound).
- `cidXXXX.engine.csv` ๐Ÿ“‘: Engine-specific Toxtree outputs, where `engine` corresponds to:
- `cramer`
- `cramer2`
- `cramer3`
- `kroes`
- `dnabinding`
- `skin`
- `eye`
- `Ames`
- `cidXXXX.engine.json` ๐Ÿ“‚: Processed **JSON versions** of the Toxtree outputs for faster lookup.
- `structure/cidXXXX.sdf` ๐Ÿงฑ: Cached **SDF structure file** used as input for Toxtree.
- `structure/cidXXXX.png` ๐ŸŽจ: **Cropped PNG image** of the molecule structure.

## ๐Ÿ”น How It Works

1. When a compound is assessed, `migrantToxtree` first checks if **JSON results exist**.
2. If found, data is retrieved directly from JSON (fastest lookup).
3. If missing, `Toxtree` is executed to generate a **CSV file**.
4. The CSV results are then **converted into JSON** and stored for future use.
5. If structure files are not available, they are downloaded from **PubChem** and stored in `structure/`.

## โš ๏ธ Notes

- **Do not manually modify or delete files** unless necessary, as `migrantToxtree` automatically manages the cache.
- To force an update, use the `refresh=True` flag when initializing `migrantToxtree`.
- To fully regenerate all files, use `no_cache=True` to overwrite existing data.

๐Ÿš€ **Using local caching improves performance and allows for seamless offline toxicological assessments in SFPPy.**

0 comments on commit 4011f32

Please sign in to comment.