-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update install script to use repo and sha
- Loading branch information
Showing
4 changed files
with
122 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#------------------------------------------------------------------------------# | ||
name: Pipeline Database | ||
#------------------------------------------------------------------------------# | ||
# Global workflow environment variables | ||
env: | ||
EAGER_CONDA_ENV: "nf-core-eager-2.2.0dev" | ||
EAGER_NF_REV: "7b51863957" | ||
PHYLO_CONDA_ENV: "plague-phylogeography-0.1.4dev" | ||
CONDA_ENVS_PATH: "/home/runner/miniconda/envs:/usr/share/miniconda/envs" | ||
CONDA_PKGS_DIRS: "/home/runner/miniconda/pkgs" | ||
GH_RESOURCES: "--max_memory 6.GB --max_cpus 2" | ||
SQLITE_DB: "/home/runner/.nextflow/assets/ktmeaton/plague-phylogeography/results/ncbimeta_db/update/latest/output/database/yersinia_pestis_db.sqlite" | ||
SQLITE_CONFIG: "/home/runner/.nextflow/assets/ktmeaton/plague-phylogeography/config/ncbimeta.yaml" | ||
SQLITE_TABLE: "BioSample" | ||
SQLITE_BACKUP: "/home/runner/.nextflow/assets/ktmeaton/plague-phylogeography/results/ncbimeta_db/update/latest/yersinia_pestis_db_BioSample.tsv" | ||
#------------------------------------------------------------------------------# | ||
# Workflow conditions | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
paths: | ||
- '.github/workflows/pipeline_db.yaml' | ||
- 'config/ncbimeta.yaml' | ||
- 'main.nf' | ||
- 'nextflow.config' | ||
pull_request: | ||
branches: | ||
- '*' | ||
release: | ||
types: [published] | ||
#------------------------------------------------------------------------------# | ||
jobs: | ||
#----------------------------------------------------------------------------# | ||
# Install dependencies | ||
local : | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
#------------------------------------------------------------------------# | ||
# Checkout Repository | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
# Install nextflow | ||
- name: install nextflow | ||
run: | | ||
wget -qO- get.nextflow.io | bash | ||
sudo mv nextflow /usr/local/bin/ | ||
# Setup conda | ||
- name: setup conda | ||
uses: goanpeca/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
#------------------------------------------------------------------------# | ||
# Restore (cache) conda environments | ||
- name: cache eager env | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/miniconda/envs/nf-core-eager-2.2.0dev | ||
key: eager-env-${{ runner.os }}-7b51863957 | ||
|
||
- name: cache plague-phylogeography env | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/miniconda/envs/plague-phylogeography-0.1.4dev | ||
key: plague-phylogeography-env-${{ runner.os }}-${{ hashFiles('environment.yaml') }} | ||
|
||
- name: cache nextstrain env | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/miniconda/envs/nextstrain-8.0.0 | ||
key: nextstrain-env-${{ runner.os }}-${{ hashFiles('config/nextstrain.yaml') }} | ||
#------------------------------------------------------------------------# | ||
# Check conda environments | ||
- name: check cache | ||
run: conda info --envs | ||
#------------------------------------------------------------------------# | ||
# Download pipelines and install | ||
- name: install | ||
shell: bash -l {0} | ||
run: scripts/install.sh ${{github.repository}} ${{ github.sha }} | ||
#------------------------------------------------------------------------# | ||
# Create the database | ||
- name: pipeline db create | ||
shell: bash -l {0} | ||
run: | | ||
conda activate ${PHYLO_CONDA_ENV} | ||
nextflow run -r ${GITHUB_SHA} ${GITHUB_REPOSITORY} \ | ||
--ncbimeta_create ${SQLITE_CONFIG} \ | ||
--sqlite ${SQLITE_DB} \ | ||
--skip_sqlite_import \ | ||
--skip_reference_download \ | ||
--skip_outgroup_download \ | ||
--outdir test | ||
conda deactivate | ||
#------------------------------------------------------------------------# | ||
# Update the database | ||
- name: pipeline db update | ||
shell: bash -l {0} | ||
run: | | ||
conda activate ${PHYLO_CONDA_ENV} | ||
nextflow run -r ${GITHUB_SHA} ${GITHUB_REPOSITORY} \ | ||
--ncbimeta_update ${SQLITE_CONFIG} \ | ||
--ncbimeta_annot ${SQLITE_BACKUP} \ | ||
--ncbimeta_annot_table ${SQLITE_TABLE} \ | ||
--sqlite ${SQLITE_DB} \ | ||
--skip_sqlite_import \ | ||
--skip_reference_download \ | ||
--skip_outgroup_download \ | ||
--outdir test | ||
conda deactivate |
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
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