Skip to content

Commit e8c724b

Browse files
committed
test(gcta/remlldms): generate LDMS inputs in setup
1 parent 91ac63a commit e8c724b

3 files changed

Lines changed: 182 additions & 213 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
process GCTA_MAKEGRM_HELPER {
2+
tag "${meta.id}"
3+
label "process_medium"
4+
conda "${projectDir}/modules/nf-core/gcta/remlldms/environment.yml"
5+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
6+
'docker://community.wave.seqera.io/library/gcta:1.94.1--9bc35dc424fcf6e9' :
7+
'community.wave.seqera.io/library/gcta:1.94.1--9bc35dc424fcf6e9'}"
8+
9+
input:
10+
tuple val(meta), path(bed), path(bim), path(fam)
11+
tuple val(meta2), path(extract_file)
12+
13+
output:
14+
tuple val(meta), path("${meta.id}.grm.id"), path("${meta.id}.grm.bin"), path("${meta.id}.grm.N.bin"), emit: grm_files
15+
16+
script:
17+
def extract_param = extract_file ? "--extract ${extract_file}" : ""
18+
def bfile_prefix = bed.baseName
19+
"""
20+
set -euo pipefail
21+
22+
gcta \\
23+
--bfile "${bfile_prefix}" \\
24+
${extract_param} \\
25+
--make-grm \\
26+
--out "${meta.id}" \\
27+
--thread-num ${task.cpus}
28+
"""
29+
30+
stub:
31+
"""
32+
touch "${meta.id}.grm.id"
33+
touch "${meta.id}.grm.bin"
34+
touch "${meta.id}.grm.N.bin"
35+
"""
36+
}

0 commit comments

Comments
 (0)