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

DITTO API using FastAPI #1

Merged
merged 23 commits into from
Jan 10, 2024
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
Expand Down Expand Up @@ -58,8 +57,9 @@ target/
# DotEnv configuration
.env

# conda
# conda/pip
.conda
ditto-api-env

# Database
*.db
Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
Here is a changelog format you could use. Feel free to choose a format that works for the repo.

```txt
YYYY-MM-DD John Doe
2024-01-08 Tarun Mamidi

* Big Change 1
* Another Change 2
* Added functionality from [DITTO-UI](https://github.com/uab-cgds-worthey/DITTO-UI) repo
to query OpenCravat for annotations and make DITTO predictions.
* Uses FastAPI
```

---
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions LICENSE.md

This file was deleted.

94 changes: 43 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,65 @@
# CGDS Repository Template [:pencil2: Edit this title]
# DITTO-API

<!-- markdown-link-check-disable -->
[![Perform linting -
Markdown](https://github.com/uab-cgds-worthey/cgds_repo_template/actions/workflows/linting.yml/badge.svg)](https://github.com/uab-cgds-worthey/cgds_repo_template/actions/workflows/linting.yml)
Markdown](https://github.com/uab-cgds-worthey/DITTO-API/actions/workflows/linting.yml/badge.svg)](https://github.com/uab-cgds-worthey/DITTO-API/actions/workflows/linting.yml)
<!-- markdown-link-check-enable -->

:pencil2: Add description of the project here.
***!!! For research purposes only !!!***

Repo for querying DITTO predictions for variants using FastAPI.

## Requirements

:pencil2: What are the requirements to install and run the project.
Following are required:

- [git](https://git-scm.com/downloads)
- python3.7+ & [python virtual environment](https://docs.python.org/3/tutorial/venv.html)
- pip3

## How to install

:pencil2: Add installation instructions here.
Installation simply requires fetching the source code.

## How to run
To fetch source code, change in to directory of your choice and run:

:pencil2: Add run instructions here. This includes necessary configurations as well as the commands used.

## Repo's directory structure
```sh
git clone https://github.com/uab-cgds-worthey/DITTO-API.git
```

The directory structure below shows the nature of files/directories used in this repo.
Change in to root directory and run the command below to install environment:

```sh
$ tree -a cgds_repo_template/
cgds_repo_template
├── CHANGELOG.md <- Log of changes made
├── CONTRIBUTING.md <- Contribution guidelines
├── LICENSE.md <- License for the repo
├── README.md
├── .gitignore <- Specifies intentionally untracked files to ignore by git
├── .editorconfig <- Helps maintain consistent coding styles for multiple users working on the same project across
│ various editors and IDEs. See https://editorconfig.org/ for more info
├── .markdownlint.json <- Markdown linting config
├── .pylintrc <- Python linting config
├── configs <- Dir to store config files. Conda env, requirements.txt, etc.
├── data <- Dir structure from http://drivendata.github.io/cookiecutter-data-science. Please give it a read.
│   ├── external <- Data from third party sources
│   ├── interim <- Intermediate data that has been transformed
│   ├── processed <- The final, canonical datasets and results
│   └── raw <- The original, immutable data dump
├── notebooks <- Dir to store Jupyter, R Markdown notebooks, etc.
├── src <- Dir to store source code for use in this project
├── .github
│   ├── ISSUE_TEMPLATE <- Github issue templates
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE <- Github PR templates
│   │   └── pull_request_template.md
│   └── workflows <- Github actions workflows for automated processes (eg. linting, etc)
│   └── linting.yml
└── logs <- Dir to store log files
# Create an environment. Needed only the first time.
python3 -m venv ditto-api-env
source ditto-api-env/bin/activate
pip3 install -r requirements.txt
```

## How to run

Run the below command to activate the API

```sh
cd src
uvicorn main:app --reload
```

Test the app using this example as web address -
<!-- markdown-link-check-disable -->
<http://localhost:8000/docs>
<!-- markdown-link-check-enable -->
and use this variant as example: 1-2406483-C-G

## Contributing

We welcome contributions! [See the docs for guidelines](./CONTRIBUTING.md).

## Contact information

For issues, please send an email with clear description to

|Name | Email |
------|--------|
Tarun Mamidi | <[email protected]>
Brandon Wilk | <[email protected]>
Loading