Skip to content

Commit

Permalink
Merge pull request #1 from Functional-Genomics-Lab/working-dreg
Browse files Browse the repository at this point in the history
Change dREG container
  • Loading branch information
edmundmiller authored Aug 21, 2024
2 parents 06a1d11 + a09aa8b commit 114ed0b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 156 deletions.
15 changes: 15 additions & 0 deletions bin/cuda_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

NVIDIA_SMI=$(which nvidia-smi)

export LC_ALL=C
export LANG=C

if [ -x "$NVIDIA_SMI" ]; then
CUDA_VERSION=$($NVIDIA_SMI --version | grep "CUDA Version" | awk '{print $NF}')
echo "$CUDA_VERSION"
exit 0
else
echo "CUDA is not available" >&2
exit 1
fi
121 changes: 0 additions & 121 deletions bin/run_dREG.R

This file was deleted.

1 change: 1 addition & 0 deletions conf/cuda-container.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
params.cuda = "${projectDir}/bin/cuda_version.sh".execute().text.trim()
28 changes: 0 additions & 28 deletions modules/local/dreg/Dockerfile

This file was deleted.

12 changes: 6 additions & 6 deletions modules/local/dreg/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process DREG_RUN {
publishDir "${params.outdir}/dreg/", mode: 'copy', pattern: "*dREG*"
publishDir "${params.outdir}/dreg/", mode: 'copy', pattern: "dREG_output_*"

container "docker.io/biohpc/dreg"
container "docker.io/l1drm/dreg:cuda${params.cuda}"

tag "$meta.id"
memory '50 GB'
Expand All @@ -14,17 +14,17 @@ process DREG_RUN {
path model

output:
tuple val(meta), path("${prefix}.*"), emit: dREG
tuple val(meta), path("dREG_output_*"), emit: dREG

script:
def prefix = "${meta.id}"
def prefix = "dREG_output_${meta.id}_"
"""
run_dREG.R \\
/dREG/run_dREG.R \\
${pos_bw} \\
${neg_bw} \\
${prefix} \\
${model} \\
${task.cpus} \\
${task.accelerator.request}
0
"""
}
4 changes: 3 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ profiles {
wave.enabled = true
// wave.strategy = ['dockerfile','container']
docker.enabled = true
docker.runOptions = "--rm --gpus all"
includeConfig "conf/test.config"
params.input = "https://raw.githubusercontent.com/nf-core/nascent/master/assets/samplesheet.csv"
includeConfig "conf/cuda-container.config"
// params.input = "https://raw.githubusercontent.com/nf-core/nascent/master/assets/samplesheet.csv"
// From a nascent test run
// params.bwa_index = "~/src/nf-core/nascent/work/96/746b04f1c048d94194b86ab0704d97/bwa"
}
Expand Down

0 comments on commit 114ed0b

Please sign in to comment.