This package is mapping any chemicals (from their CASRN) on the CPDAT database and provide a board exposure categorization.
Current Version 1.01 (11/23/2021)
This package developed in python will allow to map any chemicals from their CASRN to an exposure board class using CPDAT database.
Seven classes of board exposure are used:
- Pesticide: include pesticide or derivative chemicals
- Industrial: include produces found in industrial process
- Environemental: include exposure from environment, contaminated water, soil or air exposures
- Diet: include exposure chemicals found in the diet
- Pharmaceuticals: include pharmaceutical chemicals or drugs-like molecules
- Consumer products: include chemicals in consumer products
The mapping uses string terms in the different parts of the database. The all list of search terms is reported in the docs/ folder in the sources.
- Python >= 3.6 with libraries
- pip
- numpy
$pip install -i https://test.pypi.org/simple/ CPDatSSI
import CPDatSSI
pr_database = "< your path to the database >/CPDatRelease20201216/"
l_CASRN = ["106-50-3", "128-95-0", "2243-62-1", "112-38-9", "82-44-0", "2110-18-1"] # exemple of input
c_CPDAT = CPDatSSI.CPDatSSI(pr_database)
c_CPDAT.loadMapping()
c_CPDAT.listCasToFunct(l_CASRN)
out = c_CPDAT.extractBoardExposure()
print(out)
In the scripts folder in GitHub you can find a script to run CPDat in bash or powershell terminal.
python generateBoardExposure.py -h
CPDAT (version="20201216") exposure mapping
Folder: /CPDat/CPDatRelease20201216/"
Download CPDAT:
- 10-12-21: init git
- 11-01-21: transform curent script to package available in pip
- 11-23-21: publish the version 1.0
- v1.01: match search term "food contact" to Diet and Consumer Product and remove food contact categorie. Correct pharmaceuticals categorie name
- Map on DTXSID
python -m unittest tests/testMapping.py #unit test on Chemical class
python setup.py sdist bdist_wheel
python -m twine upload --repository testpypi dist/* #upload on testpypi and precise the version
pip uninstall CPDatSSI
pip install -i https://test.pypi.org/simple/ CPDatSSI