API code for SmartFilter with Flasgger Docs.
- Docker
- Docker Compose
The /apidocs/ page provides detailed information on every API call available.
- Production: https://chiltepin.health.unm.edu/smartsfilter/apidocs/
- Local: http://localhost:8000/apidocs/
UI Repository: SmartFilter-UI
git clone https://github.com/bivek2003/SmartFilter-API.gitcd SmartFilter-API- Copy
.env.dev..exampleto.env(in the./folder) - Edit the
.envcredentials as needed - Run:
docker-compose -f compose-development.yml up --build
- Copy
.env.prod.exampleto.env - Fill in/edit the
.envcredentials as needed - Update apache2 config:
- Create a new file for apache2 config:
/etc/apache2/sites-available/smartsfilterapi.conf - Add the following line to
/etc/apache2/apache2.conf:Include /etc/apache2/sites-available/smartsfilterapi.conf - Update the apache2 virtual config file:
/etc/apache2/sites-enabled/000-default.conf - Run config check:
sudo apachectl configtest - (If config check passed) reload apache:
sudo systemctl reload apache2
- Create a new file for apache2 config:
- (If server was previously up):
docker-compose -f compose-production.yml down - Run
docker-compose -f compose-production.yml up --build -d
- /get_matchcounts Description: Counts matches of a single SMARTS pattern against a list of SMILES strings.
Query Parameters:
-
smarts: The SMARTS string to match.
-
SMILES: Comma or space-separated list of SMILES.
- /get_matchFilter Description: Filters molecules that match a single SMARTS pattern.
Query Parameters:
- smarts: The SMARTS pattern to apply.
- SMILES: List of molecules to filter.
- /get_multi_matchcounts Description: Counts matches of multiple SMARTS patterns against a list of SMILES strings.
Query Parameters:
-
smarts: Comma/space-separated SMARTS patterns.
-
SMILES: List of molecules to match.
- /get_multi_matchfilter Description: Filters molecules that match all of the provided SMARTS patterns.
Query Parameters:
- smarts: Comma/space-separated SMARTS patterns.
- SMILES: List of molecules to filter.
- /get_filterpains Description: Filters molecules against PAINS (Pan Assay Interference Compounds) substructure patterns. Returns the filtered molecules and which PAINS patterns were matched.
Query Parameters:
- SMILES: List of SMILES strings to evaluate.
This API was developed with the help of the rdkit-tools library for SMARTS pattern handling and molecular analysis.
Thank you to the rdkit-tools developers for providing this powerful library.
Author / Support: Jeremy Yang, Jack Ringer
Developer: Bivek Sharma Panthi
This API was developed based on concepts and architecture inspired by the Badapple2-API repository:
https://github.com/unmtransinfo/Badapple2-API
