-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/documentation' into develop
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,4 +137,6 @@ dmypy.json | |
# Cython debug symbols | ||
cython_debug/ | ||
|
||
.DS_Store | ||
.DS_Store | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
# Drugbank Scraper | ||
|
||
## Development | ||
## Run | ||
|
||
This repo uses `Python 3.8.5`. | ||
|
||
1. See [Pipenv & Virtual Environments](https://docs.python-guide.org/dev/virtualenvs/) guide to create a virtual environment. | ||
1. Activate the virtual environment. | ||
1. See [Pipenv & Virtual Environments](https://docs.python-guide.org/dev/virtualenvs/) guide to create a virtual environment and activate the virtual environment | ||
1. Install requirements with `pip install -r requirements.txt`. | ||
1. Create PostgreSQL database. | ||
1. Create .env file with `cp .env.template .env` and fill environment variables. | ||
|
||
## Spiders | ||
|
||
### Drug | ||
|
||
Run `scrapy crawl drug` to run drug spider and populate database. This will scrape data, create and populate database tables. Final data will be in `drugbank` schema. This will: | ||
|
||
1. Scrape following data: | ||
* DrugBank ID | ||
* SMILES string | ||
* Gene name | ||
* Actions and alternative identifiers of every target. | ||
2. Save scraped data into the previously created PostgreSQL database. | ||
|
||
|
||
![Drugbank Schema](static/drugbank_schema.png "Drugbank Schema") | ||
|
||
|
||
## Development | ||
|
||
1. See the virtual environment step above. | ||
1. Install requirements with `pip install -r requirements-dev.txt`. | ||
1. Run `pre-commit install` to install pre-commit hooks. This repo is already set up to use some pre-commit hooks for code quality purposes. Configuration file is available [here](.pre-commit-config.yaml). More information about pre-commit is available on [their website](https://pre-commit.com/). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.