Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update db images in docs #720

Merged
merged 4 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 45 additions & 39 deletions docs/docs/database.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,84 @@
# Database

The HAWC database is a [PostgreSQL](https://www.postgresql.org/) database; it utilizes some advanced PostgreSQL-specific feature such as [JSON fields](https://www.postgresql.org/docs/current/static/datatype-json.html). The overall database schema is as follows (sections below break down the schema into more digestible components):
The HAWC database is a [PostgreSQL](https://www.postgresql.org/) database. See diagrams for individual apps withing the larger HAWC project.

## Literature screening schema

<figure markdown>
![HAWC data schema](./static/img/hawc-schema.png)
<figcaption>The image is very large; please save/or open in another tab.</figcaption>
![HAWC literature data schema](./static/img/hawc-schema-lit.png)
<figcaption>Study and literature schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## Study and risk of bias schema

<figure markdown>
![HAWC study data schema](./static/img/hawc-study-schema.png)
<figcaption>Study, literature, and risk-of bias schema. The image is very large; please save/or open in another tab.</figcaption>
![HAWC study data schema](./static/img/hawc-schema-study.png)
<figcaption>Study and risk-of bias schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## Animal bioassay schema

<figure markdown>
![HAWC animal bioassay data schema](./static/img/hawc-animal-schema.png)
<figcaption>Animal bioassay and BMD schema. The image is very large; please save/or open in another tab.</figcaption>
![HAWC animal bioassay data schema](./static/img/hawc-schema-animal.png)
<figcaption>Animal bioassay schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

<figure markdown>
![HAWC BMD data schema](./static/img/hawc-schema-bmd.png)
<figcaption>BMD schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## Epidemiology schema

<figure markdown>
![HAWC epidemiology data schema](./static/img/hawc-epi-schema.png)
<figcaption>Epidemiology and epidemiological meta-analysis schema. The image is very large; please save/or open in another tab.</figcaption>
![HAWC epidemiology v2 data schema](./static/img/hawc-schema-epiv2.png)
<figcaption>Epidemiology v2 schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

<figure markdown>
![HAWC epidemiology data schema](./static/img/hawc-schema-epi.png)
<figcaption>Epidemiology schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

<figure markdown>
![HAWC epi meta analysis data schema](./static/img/hawc-schema-epimeta.png)
<figcaption>Epidemiology meta-analysis schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## *In-vitro* data schema

<figure markdown>
![HAWC invitro data schema](./static/img/hawc-invitro-schema.png)
![HAWC invitro data schema](./static/img/hawc-schema-invitro.png)
<figcaption>*In vitro* data schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## *Vocabulary* schema

<figure markdown>
![HAWC controlled vocabulary + ontology mapping data schema](./static/img/hawc-vocab-schema.png)
![HAWC controlled vocabulary schema](./static/img/hawc-schema-vocab.png)
<figcaption>Controlled vocabulary + ontology mapping data schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## *Summary* schema

<figure markdown>
![HAWC summary data schema](./static/img/hawc-schema-summary.png)
<figcaption>Summary data schema. The image is very large; please save/or open in another tab.</figcaption>
</figure>

## Schema figure generation

To generate these database schema diagrams:

```bash
manage graph_models \
-a -g --pydot \
-o ./docs/source/_static/hawc-schema.png

manage graph_models \
lit study riskofbias \
-g --pydot \
-o ./docs/source/_static/hawc-study-schema.png

manage graph_models \
animal bmd \
-g --pydot \
-o ./docs/source/_static/hawc-animal-schema.png

manage graph_models \
epi epimeta \
-g --pydot \
-o ./docs/source/_static/hawc-epi-schema.png

manage graph_models \
invitro \
-g --pydot \
-o ./docs/source/_static/hawc-invitro-schema.png

manage graph_models \
vocab \
-g --pydot \
-o ./docs/source/_static/hawc-vocab-schema.png
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-lit.png lit study
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-study.png study riskofbias
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-animal.png animal
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-bmd.png bmd
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-epi.png epi
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-epiv2.png epiv2
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-epimeta.png epimeta
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-invitro.png invitro
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-vocab.png vocab
manage graph_models -g --pydot -o ./docs/docs/static/img/hawc-schema-summary.png summary
```
Binary file removed docs/docs/static/img/hawc-animal-schema.png
Binary file not shown.
Binary file removed docs/docs/static/img/hawc-epi-schema.png
Binary file not shown.
Binary file removed docs/docs/static/img/hawc-invitro-schema.png
Binary file not shown.
Binary file added docs/docs/static/img/hawc-schema-animal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-bmd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-epi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-epimeta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-epiv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-invitro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-lit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-study.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/static/img/hawc-schema-vocab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/docs/static/img/hawc-schema.png
Binary file not shown.
Binary file removed docs/docs/static/img/hawc-study-schema.png
Binary file not shown.
Binary file removed docs/docs/static/img/hawc-vocab-schema.png
Binary file not shown.