Skip to content

Commit 34b34c9

Browse files
committed
Add gcta/remlldms module
1 parent 4b801f9 commit 34b34c9

6 files changed

Lines changed: 683 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- bioconda::gcta=1.94.1
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
process GCTA_REMLLDMS {
2+
tag "gcta_reml_ldms_${meta.id}_${meta2.id}"
3+
label 'process_medium'
4+
conda "${moduleDir}/environment.yml"
5+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
6+
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/46/46b0d05f0daa47561d87d2a9cac5e51edc2c78e26f1bbab439c688386241a274/data'
7+
: 'community.wave.seqera.io/library/gcta:1.94.1--9bc35dc424fcf6e9'}"
8+
9+
input:
10+
tuple val(meta), path(phenotypes_file)
11+
tuple val(meta2), path(mgrm_file), path(grm_files)
12+
tuple val(meta3), path(quant_covariates_file)
13+
tuple val(meta4), path(cat_covariates_file)
14+
15+
output:
16+
tuple val(meta), path("*.hsq"), emit: reml_results
17+
tuple val("${task.process}"), val("gcta"), eval("gcta --version | sed -En 's/^[*] version v([0-9.]*).*/\\1/p'"), emit: versions_gcta, topic: versions
18+
19+
when:
20+
task.ext.when == null || task.ext.when
21+
22+
script:
23+
def prefix = task.ext.prefix ?: "${meta.id}"
24+
def qcovar_param = quant_covariates_file ? "--qcovar ${quant_covariates_file}" : ''
25+
def covar_param = cat_covariates_file ? "--covar ${cat_covariates_file}" : ''
26+
def extra_args = task.ext.args ?: ''
27+
28+
"""
29+
set -euo pipefail
30+
31+
gcta \\
32+
--reml \\
33+
--reml-no-constrain \\
34+
--mgrm ${mgrm_file} \\
35+
--pheno ${phenotypes_file} \\
36+
${qcovar_param} \\
37+
${covar_param} \\
38+
--out "${prefix}" \\
39+
--thread-num ${task.cpus} ${extra_args}
40+
"""
41+
42+
stub:
43+
def prefix = task.ext.prefix ?: "${meta.id}"
44+
"""
45+
touch "${prefix}.hsq"
46+
"""
47+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
2+
name: "gcta_remlldms"
3+
description: Run REML-LDMS heritability estimation with an MGRM manifest
4+
keywords:
5+
- gcta
6+
- genome-wide complex trait analysis
7+
- reml
8+
- restricted maximum likelihood
9+
- ldms
10+
- linkage disequilibrium and minor allele frequency stratification
11+
- grm
12+
- genetic relationship matrix
13+
- genetics
14+
tools:
15+
- "gcta":
16+
description: "Genome-wide Complex Trait Analysis (GCTA) estimates genetic relationships, variance components, and association statistics from genome-wide data."
17+
homepage: "https://yanglab.westlake.edu.cn/software/gcta/"
18+
documentation: "https://yanglab.westlake.edu.cn/software/gcta/static/gcta_doc_latest.pdf"
19+
tool_dev_url: "https://yanglab.westlake.edu.cn/software/gcta/"
20+
licence: ["GPL-3.0-only"]
21+
identifier: "biotools:gcta"
22+
input:
23+
- - meta:
24+
type: map
25+
description: |
26+
Groovy map containing phenotype metadata
27+
e.g. `[ id:'QuantitativeTrait' ]`
28+
- phenotypes_file:
29+
type: file
30+
description: Phenotype file passed to `--pheno`
31+
pattern: "*.{phe,pheno,txt,tsv}"
32+
ontologies:
33+
- edam: "http://edamontology.org/format_3475"
34+
- - meta2:
35+
type: map
36+
description: |
37+
Groovy map containing MGRM metadata
38+
e.g. `[ id:'plink_simulated_ldms' ]`
39+
- mgrm_file:
40+
type: file
41+
description: MGRM manifest file
42+
pattern: "*.mgrm"
43+
ontologies:
44+
- edam: "http://edamontology.org/format_2330"
45+
- grm_files:
46+
type: file
47+
description: GRM bundles referenced by `mgrm_file`
48+
pattern: "*.grm.*"
49+
ontologies: []
50+
- - meta3:
51+
type: map
52+
description: |
53+
Groovy map containing quantitative covariate metadata
54+
e.g. `[ id:'covariates_quant' ]`
55+
- quant_covariates_file:
56+
type: file
57+
description: Quantitative covariates file, pass `[]` when absent
58+
pattern: "*.{covar,cov,txt,tsv}"
59+
ontologies:
60+
- edam: "http://edamontology.org/format_3475"
61+
- - meta4:
62+
type: map
63+
description: |
64+
Groovy map containing categorical covariate metadata
65+
e.g. `[ id:'covariates_cat' ]`
66+
- cat_covariates_file:
67+
type: file
68+
description: Categorical covariates file, pass `[]` when absent
69+
pattern: "*.{covar,cov,txt,tsv}"
70+
ontologies:
71+
- edam: "http://edamontology.org/format_3475"
72+
output:
73+
reml_results:
74+
- - meta:
75+
type: map
76+
description: |
77+
Groovy map containing phenotype metadata
78+
e.g. `[ id:'QuantitativeTrait' ]`
79+
- "*.hsq":
80+
type: file
81+
description: REML-LDMS result file
82+
pattern: "*.{hsq}"
83+
ontologies:
84+
- edam: "http://edamontology.org/format_2330"
85+
versions_gcta:
86+
- - "${task.process}":
87+
type: string
88+
description: The process the version was collected from
89+
- "gcta":
90+
type: string
91+
description: The tool name
92+
- "gcta --version | sed -En 's/^[*] version v([0-9.]*).*/\\1/p'":
93+
type: eval
94+
description: The command used to retrieve the GCTA version
95+
topics:
96+
versions:
97+
- - ${task.process}:
98+
type: string
99+
description: The process the version was collected from
100+
- gcta:
101+
type: string
102+
description: The tool name
103+
- "gcta --version | sed -En 's/^[*] version v([0-9.]*).*/\\1/p'":
104+
type: eval
105+
description: The command used to retrieve the GCTA version
106+
authors:
107+
- "@lyh970817"
108+
maintainers:
109+
- "@lyh970817"

0 commit comments

Comments
 (0)