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

[GEN-1109] Setup base mkdocs for genie #566

Merged
merged 8 commits into from
May 20, 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
36 changes: 36 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Github Pages Docs
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Cache dependences
uses: actions/cache@v3
with:
path: ~/.cache/pip
# Unique cache key based on requirements.txt in docs directory
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}-mkdocs-deps
# Restore partial cache if exact match is not found
restore-keys: |
${{ runner.os }}-pip-

- name: Install mkdocs and dependencies
run: |
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python mkdocs-open-in-new-tab

- name: Build and deploy mkdocs site to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mkdocs gh-deploy --force
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ data_guide.out
Genie.Rproj
build/
dist/

# MkDocs output
docs_site/
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
[![Docker Automated](https://img.shields.io/docker/automated/sagebionetworks/genie.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/sagebionetworks/genie)
[![GitHub CI](https://img.shields.io/github/actions/workflow/status/Sage-Bionetworks/Genie/ci.yml?branch=develop&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/Genie)


## Introduction

This repository documents code used to gather, QC, standardize, and analyze data uploaded by institutes participating in AACR's Project GENIE (Genomics, Evidence, Neoplasia, Information, Exchange).

## Documentation

For more information about the AACR genie repository, [visit the GitHub Pages site.](https://sage-bionetworks.github.io/Genie/)

## Dependencies

This package contains both R, Python and cli tools. These are tools or packages you will need, to be able to reproduce these results:
Expand Down
74 changes: 74 additions & 0 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Getting Started

## Dependencies

This package contains both R, Python and cli tools. These are tools or packages you will need, to be able to reproduce these results:

- Python >=3.8 or <3.10
- `pip install -r requirements.txt`
- [bedtools](https://bedtools.readthedocs.io/en/latest/content/installation.html)
- R 4.2.2
- `renv::install()`
- Follow instructions [here](https://r-docs.synapse.org/#note-for-windows-and-mac-users) to install synapser
- [Java > 8](https://www.java.com/en/download/)
- For mac users, it seems to work better to run `brew install java`
- [wget](https://www.gnu.org/software/wget/)
- For mac users, have to run `brew install wget`

## Installation

### PyPi

The [aacrgenie](https://pypi.org/project/aacrgenie/) package is available from PyPI. It can be installed or upgraded with pip.

```
pip install aacrgenie
```

### Local

Source code and development versions are available on Github. Installing from source:

```
git clone https://github.com/Sage-Bionetworks/Genie.git
cd Genie
```

Install the packages locally.

```
pip install -e .
pip install -r requirements.txt
pip install -r requirements-dev.txt
```

You can stay on the main branch to get the latest stable release or check out the develop branch or a tagged revision:

```
git checkout <branch or tag>
```


## Configuration

Configure the Synapse client to authenticate to Synapse.

1. Create a Synapse [Personal Access token (PAT)](https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#ManagingYourAccount-PersonalAccessTokens).
1. Add a `~/.synapseConfig` file with the following information:

```
[authentication]
authtoken = <PAT here>
```

1. OR set an environmental variable

```
export SYNAPSE_AUTH_TOKEN=<PAT here>
```

1. Confirm you can log in to synapse in your terminal.

```shell
synapse login
```
15 changes: 15 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
![genie banner](https://raw.githubusercontent.com/Sage-Bionetworks/Genie/master/genie_banner.png)

# AACR Project GENIE

[![PyPi](https://img.shields.io/pypi/v/aacrgenie.svg?style=for-the-badge&label=PyPi&logo=PyPi)](https://pypi.org/project/aacrgenie)
[![Docker Automated](https://img.shields.io/docker/automated/sagebionetworks/genie.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/sagebionetworks/genie)
[![GitHub CI](https://img.shields.io/github/actions/workflow/status/Sage-Bionetworks/Genie/ci.yml?branch=develop&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/Genie)

## Introduction

This repository documents code used to gather, QC, standardize, and analyze data uploaded by institutes participating in AACR's Project GENIE (Genomics, Evidence, Neoplasia, Information, Exchange).

## Additional Documentation

Visit the [Project Genie Data Portal](https://genie.synapse.org/) to learn more about our data
1 change: 1 addition & 0 deletions docs/reference/fileformats/assay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.assay
1 change: 1 addition & 0 deletions docs/reference/fileformats/bed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.bed
1 change: 1 addition & 0 deletions docs/reference/fileformats/clinical.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.clinical
1 change: 1 addition & 0 deletions docs/reference/fileformats/cna.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.cna
1 change: 1 addition & 0 deletions docs/reference/fileformats/fileformat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.example_filetype_format
1 change: 1 addition & 0 deletions docs/reference/fileformats/maf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.maf
1 change: 1 addition & 0 deletions docs/reference/fileformats/mutations_in_cis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.mutationsInCis
1 change: 1 addition & 0 deletions docs/reference/fileformats/patient_retraction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.patientRetraction
1 change: 1 addition & 0 deletions docs/reference/fileformats/sample_retraction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.sampleRetraction
1 change: 1 addition & 0 deletions docs/reference/fileformats/seg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.seg
1 change: 1 addition & 0 deletions docs/reference/fileformats/structural_variant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.structural_variant
1 change: 1 addition & 0 deletions docs/reference/fileformats/vcf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.vcf
1 change: 1 addition & 0 deletions docs/reference/fileformats/workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie_registry.workflow
1 change: 1 addition & 0 deletions docs/reference/helper_modules/create_case_lists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.create_case_lists
1 change: 1 addition & 0 deletions docs/reference/helper_modules/dashboard_table_updater.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.dashboard_table_updater
1 change: 1 addition & 0 deletions docs/reference/helper_modules/extract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.extract
1 change: 1 addition & 0 deletions docs/reference/helper_modules/load.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.load
1 change: 1 addition & 0 deletions docs/reference/helper_modules/process_functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.process_functions
1 change: 1 addition & 0 deletions docs/reference/helper_modules/transform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.transform
1 change: 1 addition & 0 deletions docs/reference/helper_modules/validate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.validate
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: bin.consortium_to_public
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: bin.database_to_staging
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: bin.input_to_database
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.consortium_to_public
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.database_to_staging
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.input_to_database
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.process_mutation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.toRetract
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: genie.write_invalid_reasons
5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mkdocs<=1.6.0
mkdocs-material<=9.5.23
mkdocs-open-in-new-tab<=1.0.3
mkdocstrings<=0.25.1
mkdocstrings-python<=1.10.2
20 changes: 20 additions & 0 deletions docs/tutorials/local_file_validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Local File Validation

One of the features of the `aacrgenie` package is that is provides a local validation tool that GENIE data contributors and install and use to validate their files locally prior to uploading to Synapse.

```
pip install aacrgenie
genie -v
```

This will install all the necessary components for you to run the validator locally on all of your files, including the Synapse client. Please view the help to see how to run to validator.

```
genie validate -h
```

Validate a file

```
genie validate data_clinical_supp_SAGE.txt SAGE
```
Loading
Loading