diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index ff039ad..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,27 +0,0 @@ -[bumpversion] -current_version = 0.1.1 -commit = True - -[bumpversion:file:DESCRIPTION] -search = Version: {current_version} -replace = Version: {new_version} - -[bumpversion:file:conda/recipe/meta.yaml] -search = version: {current_version} -replace = version: {new_version} - -[bumpversion:file:.github/workflows/deploy.yaml] -search = VERSION: '{current_version}' -replace = VERSION: '{new_version}' - -[bumpversion:file:conda/env/yaml/sigrap.yaml] -search = r-sigrap =={current_version} -replace = r-sigrap =={new_version} - -[bumpversion:file:README.Rmd] -search = sigrap.R {current_version} -replace = sigrap.R {new_version} - -[bumpversion:file:README.md] -search = sigrap.R {current_version} -replace = sigrap.R {new_version} diff --git a/.bumpversion.toml b/.bumpversion.toml new file mode 100644 index 0000000..c4be759 --- /dev/null +++ b/.bumpversion.toml @@ -0,0 +1,40 @@ +[tool.bumpversion] +current_version = "0.1.1" +search = "{current_version}" +replace = "{new_version}" +message = "Bump version: {current_version} โ†’ {new_version}" +regex = false +ignore_missing_version = false +ignore_missing_files = false +commit = true +parse = """(?x) + (?P0|[1-9]\\d*)\\. + (?P0|[1-9]\\d*)\\. + (?P0|[1-9]\\d*) + (?:\\.(?P\\d+))? +""" + +serialize = [ + "{major}.{minor}.{patch}.{dev}", + "{major}.{minor}.{patch}", +] + +[[tool.bumpversion.files]] +filename = "DESCRIPTION" +search = "Version: {current_version}" +replace = "Version: {new_version}" + +[[tool.bumpversion.files]] +filename = ".github/workflows/deploy.yaml" +search = "VERSION: '{current_version}'" +replace = "VERSION: '{new_version}'" + +[[tool.bumpversion.files]] +filename = "conda/env/yaml/sigrap.yaml" +search = "r-sigrap =={current_version}" +replace = "r-sigrap =={new_version}" + +[[tool.bumpversion.files]] +filename = "conda/recipe/meta.yaml" +search = "version: {current_version}" +replace = "version: {new_version}" diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a8f3ab9..63e9bc9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -24,7 +24,7 @@ jobs: steps: - name: Code checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Miniconda setup uses: conda-incubator/setup-miniconda@v2 with: @@ -91,26 +91,26 @@ jobs: # work with tag from above - name: Code checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: v${{ env.VERSION }} - name: ๐Ÿฐ QEMU setup - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: ๐Ÿฏ Buildx setup - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: install: true config-inline: | [worker.oci] max-parallelism = 2 - name: ๐Ÿ™ GitHub CR login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿณ Docker img build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: tags: ghcr.io/${{ github.repository }}:${{ env.VERSION }} context: . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7823e7..d315d26 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # R specific hooks: https://github.com/lorenzwalthert/precommit repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.0 + rev: v0.4.3 hooks: - id: style-files args: [--style_pkg=styler, --style_fun=tidyverse_style] @@ -14,7 +14,7 @@ repos: - id: use-tidy-description - id: readme-rmd-rendered - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.6.0 hooks: - id: check-added-large-files args: ['--maxkb=200'] diff --git a/README.Rmd b/README.Rmd index 2b6ebf5..0415f00 100644 --- a/README.Rmd +++ b/README.Rmd @@ -70,37 +70,22 @@ sigrap_cli=$(Rscript -e 'x = system.file("cli", package = "sigrap"); cat(x, "\n" export PATH="${sigrap_cli}:${PATH}" ``` -```{bash echo=FALSE} +```{bash prompt=TRUE, echo=FALSE} sigrap_cli=$(Rscript -e 'x = system.file("cli", package = "sigrap"); cat(x, "\n")' | xargs) export PATH="${sigrap_cli}:${PATH}" -echo "$ sigrap.R --version" -echo "sigrap.R 0.1.1" -echo "" -echo "$ sigrap.R --help" -sigrap.R --help -echo "" +echo "sigrap.R --version" & sigrap.R --version echo "" +echo "#-----------------------------------#" +echo "sigrap.R --help" & sigrap.R --help echo "" echo "#------- HRDetect -------#" -echo "" -echo "" -echo "$ sigrap.R hrdetect --help" -sigrap.R hrdetect --help -echo "" -echo "" +echo "sigrap.R hrdetect --help" & sigrap.R hrdetect --help echo "" echo "#------- CHORD -------#" -echo "" -echo "" -echo "$ sigrap.R chord --help" -sigrap.R chord --help -echo "" -echo "" +echo "sigrap.R chord --help" & sigrap.R chord --help echo "" echo "#------- MutationalPatterns -------#" echo "" -echo "" -echo "$ sigrap.R mutpat --help" -sigrap.R mutpat --help +echo "sigrap.R mutpat --help" & sigrap.R mutpat --help ``` diff --git a/README.md b/README.md index 04ecb45..973f17e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -- ๐ŸŽถ sigrap - - Installation - - Main Modules - - ๐Ÿ” HRDetect - - ๐ŸŽธ CHORD - - ๐Ÿพ - MutationalPatterns - - ๐Ÿ’ป CLI +- [๐ŸŽถ sigrap](#id_-sigrap) + - [Installation](#installation) + - [Main Modules](#main-modules) + - [๐Ÿ” HRDetect](#id_-hrdetect) + - [๐ŸŽธ CHORD](#id_-chord) + - [๐Ÿพ MutationalPatterns](#id_-mutationalpatterns) + - [๐Ÿ’ป CLI](#id_-cli) @@ -15,7 +14,7 @@ Wrappers for somatic mutation signature analysis tools (HRDetect, CHORD, MutationalPatterns). -- Docs: +- Docs: @@ -29,7 +28,7 @@ install](https://anaconda.org/umccr/r-sigrap/badges/installer/conda.svg)](https: remotes::install_github("umccr/sigrap") ``` -- Or if used inside a conda environment: +- Or if used inside a conda environment: ``` bash conda install r-sigrap -c umccr -c conda-forge -c bioconda @@ -61,21 +60,22 @@ see vignette at A `sigrap` command line interface is available for convenience. -- If youโ€™re using the conda package, the `sigrap.R` command will - already be set up inside an activated conda environment. -- If youโ€™re *not* using the conda package, you need to export the - `sigrap/inst/cli/` directory to your `PATH` in order to use - `sigrap.R`. +- If youโ€™re using the conda package, the `sigrap.R` command will already + be set up inside an activated conda environment. +- If youโ€™re *not* using the conda package, you need to export the + `sigrap/inst/cli/` directory to your `PATH` in order to use + `sigrap.R`. ``` bash sigrap_cli=$(Rscript -e 'x = system.file("cli", package = "sigrap"); cat(x, "\n")' | xargs) export PATH="${sigrap_cli}:${PATH}" ``` - $ sigrap.R --version - sigrap.R 0.1.1 + sigrap.R --version + sigrap 0.1.1 - $ sigrap.R --help + #-----------------------------------# + sigrap.R --help usage: sigrap [-h] [-v] {hrdetect,chord,mutpat} ... Somatic signature wrappers @@ -87,20 +87,16 @@ export PATH="${sigrap_cli}:${PATH}" chord CHORD help mutpat MutationalPatterns help - optional arguments: + options: -h, --help show this help message and exit -v, --version show program's version number and exit - - #------- HRDetect -------# - - - $ sigrap.R hrdetect --help + sigrap.R hrdetect --help usage: sigrap hrdetect [-h] --sample SAMPLE --snv SNV --sv SV --cnv CNV [--out OUT] - optional arguments: + options: -h, --help show this help message and exit --sample SAMPLE Sample name. --snv SNV Input SNV (VCF format). @@ -108,30 +104,23 @@ export PATH="${sigrap_cli}:${PATH}" --cnv CNV Input CNV (TSV format). --out OUT Output file ['hrdetect.json.gz']. - - #------- CHORD -------# - - - $ sigrap.R chord --help + sigrap.R chord --help usage: sigrap chord [-h] --sample SAMPLE --snv SNV --sv SV [--out OUT] - optional arguments: + options: -h, --help show this help message and exit --sample SAMPLE Sample name. --snv SNV Input SNV (VCF format). --sv SV Input SV (VCF format). --out OUT Output file ['./chord.json.gz'] - - #------- MutationalPatterns -------# - - $ sigrap.R mutpat --help + sigrap.R mutpat --help usage: sigrap mutpat [-h] --sample SAMPLE --snv SNV --outdir OUTDIR - optional arguments: + options: -h, --help show this help message and exit --sample SAMPLE Sample name. --snv SNV Input SNV file (VCF format). diff --git a/conda/recipe/meta.yaml b/conda/recipe/meta.yaml index 9cec216..ee2f243 100644 --- a/conda/recipe/meta.yaml +++ b/conda/recipe/meta.yaml @@ -31,6 +31,9 @@ requirements: - bioconductor-structuralvariantannotation - r-tidyr - bioconductor-variantannotation + - bioconductor-bsgenome.hsapiens.ucsc.hg38 + - bioconductor-txdb.hsapiens.ucsc.hg38.knowngene + - bioconductor-genomeinfodbdata run: - r-base - r-assertthat @@ -47,6 +50,9 @@ requirements: - bioconductor-structuralvariantannotation - r-tidyr - bioconductor-variantannotation + - bioconductor-bsgenome.hsapiens.ucsc.hg38 + - bioconductor-txdb.hsapiens.ucsc.hg38.knowngene + - bioconductor-genomeinfodbdata test: commands: