Skip to content

Commit 4aae304

Browse files
committed
Reduce the number of parameters to the workflow.
Use SLURM_CPUS_PER_NODE for number of threads to use to dynamically scale better.
1 parent 8743b19 commit 4aae304

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

main.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ process manta {
8989
"""
9090
configManta.py --normalBam bamfile --referenceFasta $params.ref_fasta --runDir testRun
9191
cd testRun
92-
./runWorkflow.py -m local -j $params.threads
92+
./runWorkflow.py -m local -j \$SLURM_CPUS_PER_NODE
9393
mv results/variants/diploidSV.vcf.gz ../manta.vcf.gz
9494
cd ..
9595
gunzip -c manta.vcf.gz > manta.vcf
@@ -155,9 +155,9 @@ process fermikit {
155155

156156
script:
157157
"""
158-
fermi2.pl unitig -s$params.genome_size -t$params.threads -l$params.readlen -p sample sample.fq.gz > sample.mak
158+
fermi2.pl unitig -s3g -t\$SLURM_CPUS_PER_NODE -l150 -p sample sample.fq.gz > sample.mak
159159
make -f sample.mak
160-
run-calling -t$params.threads $params.ref_fasta sample.mag.gz > calling.sh
160+
run-calling -t\$SLURM_CPUS_PER_NODE $params.ref_fasta sample.mag.gz > calling.sh
161161
bash calling.sh
162162
vcf-sort -c sample.sv.vcf.gz > fermikit.vcf
163163
bgzip -c fermikit.vcf > fermikit.vcf.gz

nextflow.config

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ params {
33
project = "" // Set project or supply on commandline ( --project )
44
outdir = "results"
55

6+
ref_fasta = "/sw/data/uppnex/ToolBox/ReferenceAssemblies/hg38make/bundle/2.8/b37/human_g1k_v37.fasta"
7+
68
// Modules and their versions on the HPC-system
79
modules {
810
samtools = 'samtools/0.1.19'
@@ -15,16 +17,6 @@ params {
1517
snpeff = "snpEff/4.2"
1618
}
1719

18-
// Caller specific options
19-
threads = 16
20-
genome_size = "3g"
21-
readlen = 150
22-
ref_fasta = "/sw/data/uppnex/ToolBox/ReferenceAssemblies/hg38make/bundle/2.8/b37/human_g1k_v37.fasta"
23-
24-
vep {
25-
assembly = "GRCh37"
26-
}
27-
2820
runtime {
2921
simple = '30m' // Short simple shell jobs
3022
fermikit = '24h' // Fermikit is the longest running of them all

0 commit comments

Comments
 (0)