Skip to content

Commit

Permalink
add reference genomes sourcing from Reference-Genomes repo
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ji committed Feb 13, 2024
1 parent 2f12d81 commit 6044aa1
Show file tree
Hide file tree
Showing 110 changed files with 1,045 additions and 903 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install site benchmark dependencies
run: npm ci
- name: Build site for Playwright and get ref genome data
env:
VITE_OFFLINE_VERSION: true
run: npm run build
- name: Setup cli benchmark dependencies
run: |
cd e2e/tests/
Expand All @@ -28,12 +34,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install site benchmark dependencies
run: npm ci
- name: Build site for Playwright
env:
VITE_OFFLINE_VERSION: true
run: npm run build
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: update ref genome data

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow every Tuesday and Friday at 12:12 UTC
schedule:
- cron: '12 12 * * 2,5'

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'update-data'
cancel-in-progress: true

jobs:
deploy:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build offline mode
env:
VITE_OFFLINE_VERSION: true
run: npm run build
- name: Push updated ref genome data and offline mode to master
run: |
zip -r viralwasm-consensus-offline.zip dist/ run_website.py
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
# Check for changes
if git diff-index --quiet HEAD --; then
# No changes
echo "No changes to commit"
else
# Changes detected
git commit -m "Add updated ref genome data and offline mode zip"
git push origin master
fi
- name: Build for github pages
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion e2e/tests/download-benchmark-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd $SCRIPTPATH
mkdir data
cd data
curl -LO https://github.com/niemasd/ViralConsensus-Paper/raw/main/data/time_memory_benchmark/reads.fastq.gz
curl -LO https://github.com/Niema-Lab/ViralWasm-Consensus/raw/master/public/data/ref_genomes/NC_045512/NC_045512.fas
cp ../../public/data/Reference-Genomes/NC_045512/NC_045512.fas NC_045512.fas

for n in 10000 20000 40000 100000 200000 400000; do
for r in $(seq 1 $TEST_COUNT); do
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite --host",
"build": "vite build",
"build": "cd scripts && bash update-data.sh && cd .. && vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"host": "python3 run_website.py",
Expand Down
1 change: 1 addition & 0 deletions public/data/REFS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"NC_001477": {"name": "Dengue Virus 1", "shortname": ["denv1", "dengue1", "denguevirus1"]}, "NC_002549": {"name": "Ebola Virus (Zaire ebolavirus)", "shortname": ["ebola", "ebolavirus", "zaire", "zaireebola", "zaireebolavirus"]}, "NC_009824": {"name": "HCV genotype 3", "shortname": ["hcv3"]}, "NC_004161": {"name": "Reston Virus (Reston ebolavirus)", "shortname": ["reston", "restonvirus", "restonebola", "restonebolavirus"]}, "NC_004162": {"name": "Chikungunya Virus", "shortname": ["chikv", "chikungunya", "chikungunyavirus"]}, "NC_001802": {"name": "HIV-1", "shortname": ["hiv1"]}, "NC_014373": {"name": "Bundibugyo Virus (Bundibugyo ebolavirus)", "shortname": ["bundibugyo", "bundibugyovirus"]}, "NC_009825": {"name": "HCV genotype 4", "shortname": ["hcv4"]}, "NC_004102": {"name": "HCV genotype 1", "shortname": ["hcv1"]}, "NC_001475": {"name": "Dengue Virus 3", "shortname": ["denv3", "dengue3", "denguevirus3"]}, "NC_063383": {"name": "Mpox Virus", "shortname": ["mpox", "mpoxvirus", "monkeypox", "monkeypoxvirus"]}, "NC_009823": {"name": "HCV genotype 2", "shortname": ["hcv2"]}, "NC_001474": {"name": "Dengue Virus 2", "shortname": ["denv2", "dengue2", "denguevirus2"]}, "NC_009827": {"name": "HCV genotype 6", "shortname": ["hcv6"]}, "NC_045512": {"name": "SARS-CoV-2 (COVID-19)", "shortname": ["sc2", "sarscov2", "covid", "covid19"]}, "NC_038882": {"name": "HCV genotpye 1 (isolate H77)", "shortname": ["hcv1h77"]}, "NC_001722": {"name": "HIV-2", "shortname": ["hiv2"]}, "NC_001498": {"name": "Measles Virus (Measles morbillivirus)", "shortname": ["measles", "measlesvirus", "measlesmorbillivirus"]}, "NC_002640": {"name": "Dengue Virus 4", "shortname": ["denv4", "dengue4", "denguevirus4"]}, "NC_006432": {"name": "Sudan Virus (Sudan ebolavirus)", "shortname": ["sudan", "sudanvirus", "sudanebola", "sudanebolavirus"]}, "NC_009826": {"name": "HCV genotype 5", "shortname": ["hcv5"]}, "NC_030791": {"name": "HCV genotype 7", "shortname": ["hcv7"]}, "NC_014372": {"name": "Tai Forest Virus (Tai Forest ebolavirus, Cote d'Ivoire ebolavirus)", "shortname": ["taiforest", "taiforestvirus", "taiforestebola", "taiforestebolavirus", "cotedivoire", "cotedivoirevirus", "cotedivoireebola", "cotedivoireebolavirus"]}, "NC_039345": {"name": "Bombali Virus (Bombali ebolavirus)", "shortname": ["bombali", "bombalivirus"]}}
163 changes: 163 additions & 0 deletions public/data/Reference-Genomes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# files created here
REFS.json

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
Loading

0 comments on commit 6044aa1

Please sign in to comment.