Skip to content

Commit

Permalink
Merge pull request #9 from umccr/issues-8/conda
Browse files Browse the repository at this point in the history
Add bsgenome conda pkgs to sigrap
  • Loading branch information
pdiakumis authored Dec 12, 2024
2 parents fafc9ad + e2ef2db commit b65a86e
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 93 deletions.
27 changes: 0 additions & 27 deletions .bumpversion.cfg

This file was deleted.

40 changes: 40 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -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)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:\\.(?P<dev>\\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}"
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: .
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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']
Expand Down
29 changes: 7 additions & 22 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
61 changes: 25 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

- <a href="#id_-sigrap" id="toc-id_-sigrap">🎶 sigrap</a>
- <a href="#installation" id="toc-installation">Installation</a>
- <a href="#main-modules" id="toc-main-modules">Main Modules</a>
- <a href="#id_-hrdetect" id="toc-id_-hrdetect">🔍 HRDetect</a>
- <a href="#id_-chord" id="toc-id_-chord">🎸 CHORD</a>
- <a href="#id_-mutationalpatterns" id="toc-id_-mutationalpatterns">🐾
MutationalPatterns</a>
- <a href="#id_-cli" id="toc-id_-cli">💻 CLI</a>
- [🎶 sigrap](#id_-sigrap)
- [Installation](#installation)
- [Main Modules](#main-modules)
- [🔍 HRDetect](#id_-hrdetect)
- [🎸 CHORD](#id_-chord)
- [🐾 MutationalPatterns](#id_-mutationalpatterns)
- [💻 CLI](#id_-cli)

<!-- README.md is generated from README.Rmd. Please edit that file -->

Expand All @@ -15,7 +14,7 @@
Wrappers for somatic mutation signature analysis tools (HRDetect, CHORD,
MutationalPatterns).

- Docs: <https://umccr.github.io/sigrap/>
- Docs: <https://umccr.github.io/sigrap/>

<!-- badges: start -->

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -87,51 +87,40 @@ 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).
--sv SV Input SV (VCF format).
--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).
Expand Down
6 changes: 6 additions & 0 deletions conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit b65a86e

Please sign in to comment.