Skip to content

Commit

Permalink
Adding base project scaffold inherited from OpenOmics/nanite
Browse files Browse the repository at this point in the history
  • Loading branch information
skchronicles committed Mar 29, 2024
1 parent 3d701e2 commit 95a4934
Show file tree
Hide file tree
Showing 58 changed files with 5,073 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 4
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.smk linguist-language=Python
Snakefile linguist-language=Python
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: docs
on:
workflow_dispatch:
push:
paths:
- 'docs/**'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install --upgrade pip
- run: pip install -r docs/requirements.txt
- run: mkdocs gh-deploy --force
35 changes: 35 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: tests

on:
workflow_dispatch:
push:
branches:
- master
- main
pull_request:
branches_ignore: []

jobs:
Dry_Run_and_Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://snakemake/snakemake:v5.24.2
- name: Dry Run with test data
run: |
docker run -v $PWD:/opt2 snakemake/snakemake:v5.24.2 \
/opt2/mpox-seek run --input \
/opt2/.tests/WT_S1_0.fastq.gz /opt2/.tests/WT_S1_1.fastq.gz \
/opt2/.tests/WT_S2_0.fastq.gz /opt2/.tests/WT_S2_1.fastq.gz \
/opt2/.tests/WT_S3_1.fastq.gz /opt2/.tests/WT_S3_2.fastq.gz \
/opt2/.tests/WT_S3_3.fastq.gz /opt2/.tests/WT_S3_4.fastq.gz \
/opt2/.tests/WT_S4.fastq.gz /opt2/.tests/WT_S5.fastq.gz \
--output /opt2/output --mode local --dry-run
- name: View the pipeline config file
run: |
echo "Generated config file for pipeline...." && cat $PWD/output/config.json
- name: Lint Workflow
continue-on-error: true
run: |
docker run -v $PWD:/opt2 snakemake/snakemake:v5.24.2 snakemake --lint -s /opt2/output/workflow/Snakefile -d /opt2/output || \
echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'
171 changes: 171 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# 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/
pip-wheel-metadata/
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/

# 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
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__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
site/

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

# Pyre type checker
.pyre/

# DS_Store
.DS_Store
._*
**/.DS_Store
**/._*

.snakemake*
**/.snakemake*
.venv
.venv/*

# Pipeline Results or Output
results/
output/
tmp/
scratch/

# mkdocs documentation
site/

# Pipeline generated files or directories
.tests/*/
.snakemake/

# Cached Java directories
.oracle_jre_usage/
.java/

# GNU Parallel
.parallel/

# Temp files
*.tmp
**/*.tmp

# Test script and test
# output directories
test.sh
test_*/
tmp_*/
Empty file added .tests/WT_S1_0.fastq.gz
Empty file.
Empty file added .tests/WT_S1_1.fastq.gz
Empty file.
Empty file added .tests/WT_S2_0.fastq.gz
Empty file.
Empty file added .tests/WT_S2_1.fastq.gz
Empty file.
Empty file added .tests/WT_S3_1.fastq.gz
Empty file.
Empty file added .tests/WT_S3_2.fastq.gz
Empty file.
Empty file added .tests/WT_S3_3.fastq.gz
Empty file.
Empty file added .tests/WT_S3_4.fastq.gz
Empty file.
Empty file added .tests/WT_S4.fastq.gz
Empty file.
Empty file added .tests/WT_S5.fastq.gz
Empty file.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0-beta] - 2024-03-29
### Start
- Created scaffold from [nanite](https://github.com/OpenOmics/nanite) for building the pipeline
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 OpenOmics

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
9 changes: 9 additions & 0 deletions config/cluster.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"__default__": {
"threads": "2",
"mem": "8g",
"partition": "norm",
"gres": "lscratch:32",
"time": "0-04:00:00"
}
}
4 changes: 4 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"options": {
}
}
5 changes: 5 additions & 0 deletions config/containers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"images": {
"mpox-seek": "docker://skchronicles/mpox:v0.1.0"
}
}
5 changes: 5 additions & 0 deletions config/genome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"references": {

}
}
7 changes: 7 additions & 0 deletions config/install.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"install": {
"resource_bundle": {

}
}
}
7 changes: 7 additions & 0 deletions config/modules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"modules": {
},
"conda":{
"mpox-seek": "workflow/envs/mpox.yaml"
}
}
35 changes: 35 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Steps for Building Docker Images

Directly below are instructions for building an image using the provided Dockerfile:

```bash
# See listing of images on computer
docker image ls

# Build from Dockerfile
docker build --no-cache -f example.dockerfile --tag=example:v0.1.0 .

# Testing, take a peek inside
docker run -ti example:v0.1.0 /bin/bash

# Updating Tag before pushing to DockerHub
docker tag example:v0.1.0 skchronicles/example:v0.1.0
docker tag example:v0.1.0 skchronicles/example # latest

# Check out new tag(s)
docker image ls

# Push new tagged image to DockerHub
docker push skchronicles/example:v0.1.0
docker push skchronicles/example:latest
```

### Other Recommended Steps

Scan your image for known vulnerabilities:

```bash
docker scan example:v0.1.0
```

> **Please Note**: Any references to `skchronicles` should be replaced your username if you would also like to push the image to a non-org account.
Loading

0 comments on commit 95a4934

Please sign in to comment.