Skip to content

Commit 04487f9

Browse files
committed
Refine gcta/calculateldscores module contract
1 parent 7fd2011 commit 04487f9

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

modules/nf-core/gcta/calculateldscores/main.nf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ process GCTA_CALCULATELDSCORES {
22
tag "${meta.id}"
33
label 'process_medium'
44
conda "${moduleDir}/environment.yml"
5-
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
6-
'docker://community.wave.seqera.io/library/gcta_r-base:31127c93877b38de' :
7-
'community.wave.seqera.io/library/gcta_r-base:31127c93877b38de' }"
5+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
6+
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/ed/ed2d6a4b4f43f3230014aa67bb40feb0acbd7cc41ef0b0a895002f1befc6502c/data'
7+
: 'community.wave.seqera.io/library/gcta_r-base:31127c93877b38de'}"
88

99
input:
1010
tuple val(meta), path(bed), path(bim), path(fam)
@@ -13,19 +13,20 @@ process GCTA_CALCULATELDSCORES {
1313
output:
1414
tuple val(meta), path("*_gcta_ld.score.ld"), emit: ld_scores
1515
tuple val(meta), path("*_snp_group1.txt"), path("*_snp_group2.txt"), path("*_snp_group3.txt"), path("*_snp_group4.txt"), emit: snp_group_files
16-
tuple val("${task.process}"), val("gcta"), eval("gcta --version 2>&1 | grep 'version v' | tr -s ' ' | cut -d' ' -f3 | sed 's/^v//'"), emit: versions_gcta, topic: versions
16+
tuple val("${task.process}"), val("gcta"), eval("gcta --version | sed -En 's/^[*] version v([0-9.]*).*/\\1/p'"), emit: versions_gcta, topic: versions
1717

1818
when:
1919
task.ext.when == null || task.ext.when
2020

2121
script:
2222
def extra_args = task.ext.args ?: ''
23+
def bfile_prefix = bed.baseName
2324
def prefix = task.ext.prefix ?: "${meta.id}"
2425

2526
"""
2627
2728
gcta \\
28-
--bfile ${meta.id} \\
29+
--bfile ${bfile_prefix} \\
2930
--ld-score-region ${ld_score_region} \\
3031
--out ${prefix}_gcta_ld \\
3132
--thread-num ${task.cpus} ${extra_args}

modules/nf-core/gcta/calculateldscores/meta.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ name: "gcta_calculateldscores"
33
description: Calculate LD scores with GCTA and segment variants into LD-based SNP groups
44
keywords:
55
- gcta
6+
- genome-wide complex trait analysis
67
- ld score
8+
- linkage disequilibrium score
79
- ldms
10+
- linkage disequilibrium and minor allele frequency stratification
811
- genetics
912
tools:
1013
- "gcta":
@@ -13,6 +16,7 @@ tools:
1316
documentation: "https://yanglab.westlake.edu.cn/software/gcta/static/gcta_doc_latest.pdf"
1417
tool_dev_url: "https://github.com/jianyangqt/gcta"
1518
licence: ["GPL-3.0-only"]
19+
identifier: "biotools:gcta"
1620
input:
1721
- - meta:
1822
type: map
@@ -90,7 +94,7 @@ output:
9094
- "gcta":
9195
type: string
9296
description: The tool name
93-
- "gcta --version 2>&1 | grep 'version v' | tr -s ' ' | cut -d' ' -f3 | sed 's/^v//'":
97+
- "gcta --version | sed -En 's/^[*] version v([0-9.]*).*/\\1/p'":
9498
type: eval
9599
description: The command used to generate the version of the tool
96100
topics:
@@ -101,10 +105,10 @@ topics:
101105
- gcta:
102106
type: string
103107
description: The tool name
104-
- gcta --version 2>&1 | grep 'version v' | tr -s ' ' | cut -d' ' -f3 | sed 's/^v//':
108+
- "gcta --version | sed -En 's/^[*] version v([0-9.]*).*/\\1/p'":
105109
type: eval
106110
description: The command used to generate the version of the tool
107111
authors:
108-
- "@andongni"
112+
- "@lyh970817"
109113
maintainers:
110-
- "@andongni"
114+
- "@lyh970817"

0 commit comments

Comments
 (0)