Skip to content

Commit

Permalink
Merge pull request #242 from sigven/locale
Browse files Browse the repository at this point in the history
Set locale to avoid apptainer warnings on HPC
  • Loading branch information
sigven authored Jun 20, 2024
2 parents 2ca3293 + 1486740 commit b141441
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.4.1.9016
current_version = 1.4.1.9019
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<dev>\d+))?
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build_conda_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
branches:
- master
- bundle_update_2023
- locale
env:
atoken: ${{ secrets.ANACONDA_UPLOAD_TOKEN }}
recipe_path: conda/recipe
env_yml_path: conda/env/yml
env_lock_path: conda/env/lock
VERSION: '1.4.1.9016' # versioned by bump2version
VERSION: '1.4.1.9019' # versioned by bump2version
jobs:
build_pcgrr_conda_pkg:
# When merging to one of the branches above and the commit message matches
Expand Down Expand Up @@ -85,6 +86,7 @@ jobs:
git commit -m "${MSG}"
git push
- name: 🌐 Website publish
if: github.ref_name == 'master'
run: |
micromamba env create -n pkgdownenv -f ${env_yml_path}/pkgdown.yml
micromamba activate pkgdownenv
Expand Down Expand Up @@ -125,8 +127,8 @@ jobs:
sha: the_sha
})
#- name: 🗑 Free Disk Space
# uses: jlumbroso/free-disk-space@main
- name: 🗑 Free Disk Space
uses: jlumbroso/free-disk-space@main
# work with tag from above
- name: Code checkout
uses: actions/checkout@v4
Expand All @@ -152,9 +154,10 @@ jobs:
sigven/pcgr:${{ env.VERSION }}
outputs: type=docker,dest=pcgr_${{ env.VERSION }}.tar

# Apptainer
- name: Apptainer setup
uses: eWaterCycle/setup-apptainer@v2
- name: Apptainer build
- name: 🕹️ Apptainer build
run: |
ls -lSha
df -h
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN mamba create -n pcgr --file ${PCGR_CONDA_ENV_DIR}/pcgr-linux-64.lock
RUN mamba create -n pcgrr --file ${PCGR_CONDA_ENV_DIR}/pcgrr-linux-64.lock
RUN mamba clean --all --force-pkgs-dirs --yes

FROM quay.io/bioconda/base-glibc-busybox-bash:3.1
FROM quay.io/bioconda/base-glibc-debian-bash:3.1

COPY --from=0 /opt/mambaforge/envs/ /opt/mambaforge/envs/

Expand Down
4 changes: 2 additions & 2 deletions conda/env/lock/pcgr-linux-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: linux-64
# input_hash: df6430571fbb82456261636d686c3f4ba3929721b191f9a52ff5744b86e20f32
# input_hash: c67e863b6b1bcd492711b5f53604da4f89462c6bc44b751d8390cb0e604636d3
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/bioconda/linux-64/blast-legacy-2.2.26-h9ee0642_3.tar.bz2#b7fe67ef984501e8089a142f1f58ab2f
Expand Down Expand Up @@ -201,7 +201,7 @@ https://conda.anaconda.org/bioconda/linux-64/pybedtools-0.10.0-py312ha1f7cf2_1.t
https://conda.anaconda.org/conda-forge/linux-64/scipy-1.13.1-py312hc2bc53b_0.conda#864b2399a9c998e17d1a9a4e0c601285
https://conda.anaconda.org/bioconda/noarch/vcf2maf-umccr-1.6.21.20230511-hdfd78af_0.tar.bz2#ec3a03df0bce17c35b2a2d1436c718ea
https://conda.anaconda.org/bioconda/linux-64/blast-2.15.0-pl5321h6f7f691_1.tar.bz2#f7e6a87317b5d00469d39a2d1ef2698f
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9016-py_0.tar.bz2#082878c9f25e30fa6f820267654a1798
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9019-py_0.tar.bz2#c0e551dd45f5802f226f654f50e78c53
https://conda.anaconda.org/bioconda/noarch/perl-http-message-6.36-pl5321hdfd78af_0.tar.bz2#a213d1308ffa8e0789996ae6ecda98ae
https://conda.anaconda.org/bioconda/noarch/perl-net-http-6.22-pl5321hdfd78af_0.tar.bz2#f3b44f2b9932c3def346e6ad9aabe43d
https://conda.anaconda.org/bioconda/noarch/perl-www-robotrules-6.02-pl5321hdfd78af_4.tar.bz2#8305f4ed6306b1125a8c8caf2f05aec8
Expand Down
4 changes: 2 additions & 2 deletions conda/env/lock/pcgr-osx-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: osx-64
# input_hash: 08008428608a5260b88f62558e2503ae382a060819418ecc0280e3fcd7741505
# input_hash: 7985ef7bc19181daf269f76028a4367ccd9143de1434c49432cdc042b9cdd00a
@EXPLICIT
https://conda.anaconda.org/conda-forge/osx-64/argtable2-2.13-h10d778d_1004.conda#7ebcbc431363dfbf9ae25e6a7205d414
https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h10d778d_5.conda#6097a6ca9ada32699b5fc4312dd6ef18
Expand Down Expand Up @@ -212,7 +212,7 @@ https://conda.anaconda.org/bioconda/noarch/perl-libwww-perl-6.67-pl5321hdfd78af_
https://conda.anaconda.org/bioconda/osx-64/pybedtools-0.10.0-py310h0b3aad1_1.tar.bz2#ade72e96268dba2ca0ba1f728dfe4c43
https://conda.anaconda.org/conda-forge/osx-64/scipy-1.13.1-py310h35d8cac_0.conda#97b362043d6a1dd28e7da5fbf277594d
https://conda.anaconda.org/conda-forge/osx-64/compiler-rt-12.0.1-he01351e_0.tar.bz2#aa2cb3794dae4a09f19c3b7169b5df1f
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9016-py_0.tar.bz2#082878c9f25e30fa6f820267654a1798
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9019-py_0.tar.bz2#c0e551dd45f5802f226f654f50e78c53
https://conda.anaconda.org/bioconda/noarch/perl-xml-dom-1.46-pl5321hdfd78af_1.tar.bz2#45b7ce435727456727f45b3e2121b23b
https://conda.anaconda.org/bioconda/osx-64/t-coffee-12.00.7fb08c2-h26a2512_0.tar.bz2#fe6f3532da0e9d3868b58ecd07f33744
https://conda.anaconda.org/bioconda/noarch/vcf2tsvpy-0.6.1-pyhda70652_0.tar.bz2#cb9612a58cefb7e2a144c759027c0a94
Expand Down
6 changes: 3 additions & 3 deletions conda/env/lock/pcgrr-linux-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: linux-64
# input_hash: a01aaf6b50f52e080b7dbfd938e3de505ffea44c78b046868dd807bfa5d09245
# input_hash: 81825ef68192e5d9623a94cf6de817ee84fea2dae9a939d7ff51e25ebe43ec9f
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/noarch/_r-mutex-1.0.1-anacondar_1.tar.bz2#19f9db5f4f1b7f5ef5f6d67207f25f38
Expand Down Expand Up @@ -324,5 +324,5 @@ https://conda.anaconda.org/bioconda/noarch/bioconductor-bsgenome.hsapiens.ucsc.h
https://conda.anaconda.org/bioconda/noarch/bioconductor-genomicfeatures-1.54.1-r43hdfd78af_0.tar.bz2#445ea419486180673fffc192b5fe8edb
https://conda.anaconda.org/bioconda/linux-64/bioconductor-variantannotation-1.48.1-r43ha9d7317_1.tar.bz2#01c0b8e76583c3f8872e3181dd06ffbd
https://conda.anaconda.org/bioconda/noarch/bioconductor-mutationalpatterns-3.12.0-r43hdfd78af_0.tar.bz2#d22030798f7d464ddb092e4651625210
https://conda.anaconda.org/pcgr/noarch/r-pcgrr-1.4.1.9016-r43_0.tar.bz2#bcca7fbef7165257a5b45165cae1b950
https://conda.anaconda.org/pcgr/noarch/r-cpsr-1.0.1.9014-r43_0.tar.bz2#984c10b7420207efd790c6d1ea44df45
https://conda.anaconda.org/pcgr/noarch/r-pcgrr-1.4.1.9019-r43_0.tar.bz2#eb6b341753cea5e076bab5cf5f501a32
https://conda.anaconda.org/pcgr/noarch/r-cpsr-1.0.1.9015-r43_0.tar.bz2#911bb3e2fdbbb91ae3c8d74006141fe3
6 changes: 3 additions & 3 deletions conda/env/lock/pcgrr-osx-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: osx-64
# input_hash: db5ac7aa6c400890ddebdcc56eb3f7e2ca577a9e48aedb4c0172f0d57658c66a
# input_hash: 00e59c15a1ce1fa31f11804a602a83c58daa9256c8c0d8cb0e8138c7f1d4fa27
@EXPLICIT
https://conda.anaconda.org/conda-forge/noarch/_r-mutex-1.0.1-anacondar_1.tar.bz2#19f9db5f4f1b7f5ef5f6d67207f25f38
https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h10d778d_5.conda#6097a6ca9ada32699b5fc4312dd6ef18
Expand Down Expand Up @@ -318,5 +318,5 @@ https://conda.anaconda.org/bioconda/noarch/bioconductor-bsgenome.hsapiens.ucsc.h
https://conda.anaconda.org/bioconda/noarch/bioconductor-genomicfeatures-1.54.1-r43hdfd78af_0.tar.bz2#445ea419486180673fffc192b5fe8edb
https://conda.anaconda.org/bioconda/osx-64/bioconductor-variantannotation-1.48.1-r43h4c50009_1.tar.bz2#4bc1f791804daa0570cd35a63ca0a268
https://conda.anaconda.org/bioconda/noarch/bioconductor-mutationalpatterns-3.12.0-r43hdfd78af_0.tar.bz2#d22030798f7d464ddb092e4651625210
https://conda.anaconda.org/pcgr/noarch/r-pcgrr-1.4.1.9016-r43_0.tar.bz2#bcca7fbef7165257a5b45165cae1b950
https://conda.anaconda.org/pcgr/noarch/r-cpsr-1.0.1.9014-r43_0.tar.bz2#984c10b7420207efd790c6d1ea44df45
https://conda.anaconda.org/pcgr/noarch/r-pcgrr-1.4.1.9019-r43_0.tar.bz2#eb6b341753cea5e076bab5cf5f501a32
https://conda.anaconda.org/pcgr/noarch/r-cpsr-1.0.1.9015-r43_0.tar.bz2#911bb3e2fdbbb91ae3c8d74006141fe3
2 changes: 1 addition & 1 deletion conda/env/yml/pcgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ channels:
- conda-forge

dependencies:
- pcgr::pcgr ==1.4.1.9016 # versioned by bump2version
- pcgr::pcgr ==1.4.1.9019 # versioned by bump2version
- bedtools
- bcftools
- cyvcf2
Expand Down
2 changes: 1 addition & 1 deletion conda/env/yml/pcgrr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channels:

dependencies:
- python
- pcgr::r-pcgrr ==1.4.1.9016 # versioned by bump2version
- pcgr::r-pcgrr ==1.4.1.9019 # versioned by bump2version
- pcgr::r-cpsr
- r-argparse
- bioconductor-bsgenome.hsapiens.ucsc.hg38
Expand Down
2 changes: 1 addition & 1 deletion conda/env/yml/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- bioconda
- conda-forge
dependencies:
- pcgr::r-pcgrr ==1.4.1.9016 # versioned by bump2version
- pcgr::r-pcgrr ==1.4.1.9019 # versioned by bump2version
- r-pkgdown
- r-readr
- r-glue
Expand Down
2 changes: 1 addition & 1 deletion conda/recipe/pcgr/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: pcgr
version: 1.4.1.9016 # versioned by bump2version
version: 1.4.1.9019 # versioned by bump2version

source:
path: ../../..
Expand Down
2 changes: 1 addition & 1 deletion conda/recipe/pcgrr/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: r-pcgrr
version: 1.4.1.9016 # versioned by bump2version
version: 1.4.1.9019 # versioned by bump2version

source:
path: ../../../pcgrr
Expand Down
2 changes: 1 addition & 1 deletion pcgr/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# versioned by bump2version
__version__ = '1.4.1.9016'
__version__ = '1.4.1.9019'
1 change: 0 additions & 1 deletion pcgr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def cli():
optional_cna.add_argument("--input_cna", dest="input_cna", help="Somatic copy number alteration segments (tab-separated values)")
optional_cna.add_argument("--n_copy_gain", type=int, default=6, dest="n_copy_gain", help="Minimum number of total copy number for segments considered as gains/amplifications (default: %(default)s)")
optional_cna.add_argument("--cna_overlap_pct", type=float, default=50, dest="cna_overlap_pct", help="Mean percent overlap between copy number segment and gene transcripts for reporting of gains/losses in tumor suppressor genes/oncogenes, (default: %(default)s)")

#optional_rna.add_argument("--input_rna_fusion", dest = "input_rna_fusion", help = "File with RNA fusion transcripts detected in tumor (tab-separated values)")
optional_rna.add_argument("--input_rna_expression", dest = "input_rna_exp", help = "File with bulk RNA expression counts (TPM) of transcripts in tumor (tab-separated values)")
optional_rna.add_argument('--expression_sim', action='store_true', help="Compare expression profile of tumor sample to known expression profiles (default: %(default)s)")
Expand Down
8 changes: 4 additions & 4 deletions pcgr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def warn_message(message, logger):
logger.warning("")
logger.warning(message)
logger.warning("")

def random_id_generator(size = 10, chars = string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
return ''.join(random.choice(chars) for _ in range(size))

#def random_string(length):
# letters = string.ascii_lowercase
Expand Down Expand Up @@ -166,7 +166,7 @@ def safe_makedir(dname):
return dname

def sort_bed(unsorted_bed_fname: str, sorted_bed_fname: str, debug = False, logger = None):

## Sort regions in target BED
if os.path.exists(unsorted_bed_fname) and os.stat(unsorted_bed_fname).st_size != 0:
cmd_sort_custom_bed1 = 'egrep \'^[0-9]\' ' + str(unsorted_bed_fname) + \
Expand Down Expand Up @@ -197,7 +197,6 @@ def check_file_exists(fname: str, strict = True, logger = None) -> bool:
return(False)
else:
error_message(msg, logger)

return(True)

def check_tabix_file(fname: str, logger = None) -> bool:
Expand All @@ -210,3 +209,4 @@ def check_tabix_file(fname: str, logger = None) -> bool:
## check file size is more than zero
check_file_exists(tabix_file)
return(True)

2 changes: 1 addition & 1 deletion pcgrr/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: pcgrr
Type: Package
Title: Personal Cancer Genome ReporteR
Version: 1.4.1.9016
Version: 1.4.1.9019
Authors@R:
c(person(given = "Sigve",
family = "Nakken",
Expand Down
10 changes: 5 additions & 5 deletions pcgrr/R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -907,15 +907,15 @@ write_report_quarto_html <- function(report = NULL){
if(file.exists(quarto_input)){

## make temporary directory for quarto report rendering
tmp_quarto_dir <- file.path(
tmp_quarto_dir1 <- file.path(
output_dir,
paste0('quarto_', stringi::stri_rand_strings(1, 15))
)
pcgrr::mkdir(tmp_quarto_dir)
pcgrr::mkdir(tmp_quarto_dir1)
# files get copied under tmp/templates/
file.copy(pcgr_rep_template_path, tmp_quarto_dir, recursive = TRUE, overwrite = TRUE)
file.copy(pcgr_rep_template_path, tmp_quarto_dir1, recursive = TRUE, overwrite = TRUE)
# so now overwrite the variable
tmp_quarto_dir <- file.path(tmp_quarto_dir, templates_dir)
tmp_quarto_dir <- file.path(tmp_quarto_dir1, templates_dir)

quarto_main_template <-
file.path(tmp_quarto_dir, "pcgr_quarto_report.qmd")
Expand Down Expand Up @@ -970,7 +970,7 @@ write_report_quarto_html <- function(report = NULL){

## remove temporary quarto directory (if debugging is switched off)
if(!(settings$conf$debug)){
unlink(tmp_quarto_dir, force = TRUE, recursive = TRUE)
unlink(c(tmp_quarto_dir, tmp_quarto_dir1), force = TRUE, recursive = TRUE)
}
#pcgrr::log4r_info("------")
}
Expand Down
2 changes: 1 addition & 1 deletion pcgrr/vignettes/installation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require(glue, include.only = "glue")

```{r vars, echo=FALSE}
Sys.setenv(VEP_VERSION = "112")
Sys.setenv(PCGR_VERSION = "1.4.1.9016")
Sys.setenv(PCGR_VERSION = "1.4.1.9019")
Sys.setenv(BUNDLE_VERSION = "20240612")
VEP_VERSION <- Sys.getenv("VEP_VERSION")
PCGR_VERSION <- Sys.getenv("PCGR_VERSION")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pcgr"
version = "1.4.1.9016" # versioned by bump2version
version = "1.4.1.9019" # versioned by bump2version
description = "Personal Cancer Genome Reporter (PCGR) - variant interpretation for precision cancer medicine"
authors = [
{name = "Sigve Nakken", email = "[email protected]"},
Expand Down

0 comments on commit b141441

Please sign in to comment.