Skip to content

Commit

Permalink
Merge branch 'main' into testting/add_snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor authored Dec 21, 2023
2 parents 9cd6d23 + 670f763 commit f66730a
Show file tree
Hide file tree
Showing 20 changed files with 1,680 additions and 16 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04
COPY environment.yml .

# Install miniconda
Expand Down Expand Up @@ -45,12 +45,12 @@ RUN jbang export portable -O=RegenieValidateInput.jar RegenieValidateInput.java

# Install regenie (not as conda package available)
WORKDIR "/opt"
ENV REGENIE_VERSION="v3.3"
ENV REGENIE_VERSION="v3.4"
RUN mkdir regenie && cd regenie && \
wget https://github.com/rgcgithub/regenie/releases/download/${REGENIE_VERSION}/regenie_${REGENIE_VERSION}.gz_x86_64_Linux.zip && \
unzip -q regenie_v3.*.gz_x86_64_Linux.zip && \
rm regenie_v3.*.gz_x86_64_Linux.zip && \
mv regenie_v3.*.gz_x86_64_Linux regenie && \
unzip -q regenie_${REGENIE_VERSION}.gz_x86_64_Linux.zip && \
rm regenie_${REGENIE_VERSION}.gz_x86_64_Linux.zip && \
mv regenie_${REGENIE_VERSION}.gz_x86_64_Linux regenie && \
chmod +x regenie

ENV PATH="/opt/regenie/:${PATH}"
ENV PATH="/opt/regenie/:${PATH}"
9 changes: 7 additions & 2 deletions lib/WorkflowMain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,14 @@ class WorkflowMain {
exit 1, "Invalid config file. The 'write-mask' option does not work when building masks with 'sum'."
}

if(params.genotypes_association_chunk_size > 0 ) {
//&& genotypes_association_format != 'bgen' ) {
exit 1, " Chunking is currently not available for gene-based tests (param: genotypes_association_chunk_size=0)."
}

//Check association file format for gene-based tests
if (genotypes_association_format != 'bed'){
exit 1, "File format " + genotypes_association_format + " currently not supported for gene-based tests. Please use 'bed' input instead. "
if (genotypes_association_format != 'vcf' && genotypes_association_format != "bgen"){
exit 1, "File format " + genotypes_association_format + " currently not supported for gene-based tests. Please use 'vcf' or 'bgen' input instead. "
}
} else {
//Check if tests exists
Expand Down
7 changes: 5 additions & 2 deletions modules/local/regenie/regenie_step2_run_gene_tests.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ process REGENIE_STEP2_RUN_GENE_TESTS {

input:
path step1_out
tuple val(filename), path(genotyped_plink_file)
tuple val(filename), path(genotyped_plink_bim_file), path(genotyped_plink_bed_file), path(genotyped_plink_fam_file), val(range)
val assoc_format
path phenotypes_file
path covariates_file
path sample_file
path regenie_gene_anno_file
path regenie_gene_setlist_file
path regenie_gene_masks_file
Expand All @@ -20,8 +21,9 @@ process REGENIE_STEP2_RUN_GENE_TESTS {
path "${filename}_masks*"

script:
def format = assoc_format == 'bed' ? "--bed" : '--bgen'
def format = assoc_format == 'bgen' ? "--bgen" : '--pgen'
def extension = assoc_format == 'bgen' ? ".bgen" : ''
def bgen_sample = sample_file ? "--sample $sample_file" : ''
def firthApprox = params.regenie_firth_approx ? "--approx" : ""
def firth = params.regenie_firth ? "--firth $firthApprox" : ""
def binaryTrait = params.phenotypes_binary_trait ? "--bt $firth " : ""
Expand Down Expand Up @@ -65,6 +67,7 @@ process REGENIE_STEP2_RUN_GENE_TESTS {
$predictions \
$apply_rint \
$geneTest \
$bgen_sample \
$aaf \
$maxAaf \
$vcMACThr \
Expand Down
Loading

0 comments on commit f66730a

Please sign in to comment.