"Pathway service" tools
===

This directory contains scripts and other useful things for the pathway service

## Obtaining datasets

To see how the original data for [create_db.py](create_db.py) is obtained, please see the [datasets](datasets) directory.

## [create_db](create_db.py)

This script generates a sqlite database containing pathway data from NanoString's csv/tsv files. These files are not distributed within this repository, and must be obtained from your co-workers.

Arguments:

* `--pathway-file` - defaults to `pathways.tsv`. This file contains Pathway IDs (Reactome format) and their names.
* `--gene-file` - defaults to `genes.tsv`. This file contains gene information from GeneNames.org. Columns - HGNC ID, Symbol, Name, Entrez GeneId
* `--relationship-file` - defaults to `pathway_relationships.csv`. This file contains pathway connections (parent - child).
* `--pathway-gene-file` - defaults to `pathway_genes.tsv`. This file contains pathway to gene mappings.


Output:

`pathways.db` inside the program's folder.

## [cleanup_db](cleanup_db.py)

This script cleans up the pathways database removing entries that aren't needed (i.e. genes that don't resolve to any pathways). Using this tool is optional, as the only benefit is a smaller filesize.

Arguments:

* `--database` - defaults to `pathways.db`.

Output:

`pathways.db` without the unnecessary entries.
