Skip to content
Open
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
20 changes: 20 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"template": "git@github.com:NCI-GDC/bio-python-template.git",
"commit": "0b6345a590be88d3cb69c007749a0e9e415ab56f",
"context": {
"cookiecutter": {
"full_name": "Linghao Song",
"email": "sxwcasd@gmail.com",
"github_username": "sxwcasd",
"project_name": "mutect2-tool",
"package_name": "mutect2_tool",
"project_short_description": "The GATK3 MuTect2 pipeline employs a "Panel of Normals" to identify additional germline mutations. This panel is generated using TCGA blood normal genomes from thousands of individuals that were curated and confidently assessed to be cancer-free. This method allows for a higher level of confidence to be assigned to somatic variants that were called by the MuTect2 pipeline.",
"min_python_version": "3.9",
"github_repo": "https://github.com/NCI-GDC/mutect2-tool",
"commit": "0b6345a590be88d3cb69c007749a0e9e415ab56f",
"_template": "git@github.com:NCI-GDC/bio-python-template.git"
}
},
"directory": null,
"checkout": null
}
110 changes: 110 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
_version.py

# 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/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# direnv
.envrc
.direnv/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# VSCode
.vscode/
test-reports/
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@ ENV/

# VSCode
.vscode/
test-reports/

# Gitlab CI - automatically created, break flit validation
vars.env
gl-code-quality-report.html

# Added in base-container builder image
aws-lc
11 changes: 11 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
include:
- project: nci-gdc/gitlab-templates
ref: master
file:
- templates/global/full.yaml
- templates/python/full.yaml

variables:
BUILD_PY_VERSION: python3.9
RELEASE_PY_VERSION: python3.9
30 changes: 16 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
default_stages: [commit, push]
default_language_version:
python_venv: python3.6
python_venv: python3.9

repos:
- repo: git@github.com:Yelp/detect-secrets
rev: v0.13.1
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: ^(\.cruft\.json)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
- id: end-of-file-fixer
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.9.9'
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
- id: ruff
args: [ '--select', 'I', '--fix' ]
- id: ruff-format
- repo: https://github.com/cruft/cruft
rev: 2.16.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
- id: cruft
name: cruft
entry: bash -c 'cruft check || true' --
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"exclude": {
"files": null,
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2020-07-23T15:24:59Z",
"generated_at": "2020-07-21T15:11:38Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

45 changes: 27 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
ARG REGISTRY=docker.osdc.io/ncigdc
ARG BASE_CONTAINER_VERSION=latest

FROM quay.io/ncigdc/gatk:3.7 AS gatk
FROM quay.io/ncigdc/python37 AS python
FROM quay.io/ncigdc/bio-openjdk:8u282-slim
FROM ${REGISTRY}/python3.9-builder:${BASE_CONTAINER_VERSION} as builder
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

ENV BINARY mutect2-tool
LABEL maintainer="sli6@uchicago.edu"
LABEL version="nightly-2016-02-25-gf39d340"
LABEL description="GATK3 nightly-2016-02-25-gf39d340"
COPY ./ /mutect2_tool

COPY --from=python / /
COPY --from=gatk /usr/local/bin/ /usr/local/bin/
WORKDIR /mutect2_tool

COPY ./dist/ /opt
WORKDIR /opt
RUN pip install tox && tox -e build

RUN apt-get update \
&& apt-get install make \
&& rm -rf /var/lib/apt/lists/*
FROM ${REGISTRY}/python3.9:${BASE_CONTAINER_VERSION}

RUN make init-pip \
&& ln -s /opt/bin/${BINARY} /usr/local/bin/${BINARY}
LABEL org.opencontainers.image.title="mutect2_tool" \
org.opencontainers.image.description="The GATK3 MuTect2 pipeline employs a 'Panel of Normals' to identify additional germline mutations. This panel is generated using TCGA blood normal genomes from thousands of individuals that were curated and confidently assessed to be cancer-free. This method allows for a higher level of confidence to be assigned to somatic variants that were called by the MuTect2 pipeline." \
org.opencontainers.image.source="https://github.com/NCI-GDC/mutect2-tool" \
org.opencontainers.image.vendor="NCI GDC"

COPY --from=builder /mutect2_tool/dist/*.whl /mutect2_tool/
COPY requirements.txt /mutect2_tool/

WORKDIR /mutect2_tool

RUN pip install --no-deps -r requirements.txt \
&& pip install --no-deps *.whl \
&& rm -f *.whl requirements.txt

USER app

ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "mutect2_tool"]

CMD ["--help"]
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down Expand Up @@ -178,15 +178,15 @@ Apache License
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading