-
Notifications
You must be signed in to change notification settings - Fork 859
Gemma kinshipmatrix #8468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Gemma kinshipmatrix #8468
Changes from all commits
d094e76
86f37d2
0c0c10e
2d3d55d
148e187
bffcc61
b930829
85d06e9
a62a329
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"nextflow.formatting.harshilAlignment": true | ||
"nextflow.formatting.harshilAlignment": true, | ||
"nextflow.telemetry.enabled": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- "bioconda::gemma=0.98.5" |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,49 @@ | ||||||||
process GEMMA_KINSHIPMATRIX { | ||||||||
tag "$meta.id" | ||||||||
label 'process_single' | ||||||||
|
||||||||
conda "${moduleDir}/environment.yml" | ||||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||||||||
'https://depot.galaxyproject.org/singularity/gemma:0.98.5--ha36d3ea_0': | ||||||||
'community.wave.seqera.io/library/gemma:0.98.5--87bf3eea4b1ea0ad' }" | ||||||||
|
||||||||
input: | ||||||||
tuple val(meta), path(genotype) | ||||||||
tuple val(meta2), path(phenotype) | ||||||||
|
||||||||
output: | ||||||||
tuple val(meta), path("output/${meta.id}.out.cXX.txt"), emit: matrix | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you move the output? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
path "versions.yml" , emit: versions | ||||||||
|
||||||||
when: | ||||||||
task.ext.when == null || task.ext.when | ||||||||
|
||||||||
script: | ||||||||
def args = task.ext.args ?: '' | ||||||||
def prefix = task.ext.prefix ?: "${meta.id}" | ||||||||
""" | ||||||||
gemma \\ | ||||||||
$args \\ | ||||||||
-g $genotype \\ | ||||||||
-p $phenotype \\ | ||||||||
-gk \\ | ||||||||
-o ${meta.id}.out | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
cat <<-END_VERSIONS > versions.yml | ||||||||
"${task.process}": | ||||||||
gemma: \$(gemma --version) | ||||||||
END_VERSIONS | ||||||||
""" | ||||||||
|
||||||||
stub: | ||||||||
def args = task.ext.args ?: '' | ||||||||
def prefix = task.ext.prefix ?: "${meta.id}" | ||||||||
""" | ||||||||
mkdir output | ||||||||
touch output/${meta.id}.out.cXX.txt | ||||||||
Comment on lines
+42
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
cat <<-END_VERSIONS > versions.yml | ||||||||
"${task.process}": | ||||||||
gemma: \$(gemma --version) | ||||||||
END_VERSIONS | ||||||||
""" | ||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "gemma_kinshipmatrix" | ||
description: GEMMA is a software toolkit for fast application of linear mixed models (LMMs) | ||
keywords: | ||
- matrix | ||
- lmms | ||
- gwas | ||
tools: | ||
- "gemma": | ||
description: "Linear mixed models (LMMs) for genome-wide association (GWA)" | ||
homepage: "https://github.com/genetics-statistics/GEMMA" | ||
documentation: "https://github.com/genetics-statistics/GEMMA" | ||
tool_dev_url: "https://github.com/genetics-statistics/GEMMA" | ||
doi: "10.1038/ng.2310" | ||
licence: ["GPL v3"] | ||
identifier: biotools:gemma | ||
|
||
## TODO nf-core: Add a description of all of the variables used as input | ||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
|
||
- genotype: | ||
type: file | ||
description: genotype_matrix file | ||
pattern: "*.txt" | ||
|
||
- - meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
|
||
- phenotype: | ||
type: file | ||
description: phenotype file | ||
pattern: "*.txt" | ||
|
||
output: | ||
- matrix: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
- "output/${meta.id}.out.cXX.txt": | ||
type: file | ||
description: kinship matrix | ||
pattern: "output/*out.cXX.txt" | ||
- versions: | ||
- "versions.yml": | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@chriswyatt1" | ||
maintainers: | ||
- "@chriswyatt1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GEMMA_KINSHIPMATRIX" | ||
script "../main.nf" | ||
process "GEMMA_KINSHIPMATRIX" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gemma" | ||
tag "gemma/kinshipmatrix" | ||
|
||
// TODO nf-core: Change the test name preferably indicating the test-data and file-format used | ||
test("gwas - vcf - pheno") { | ||
|
||
when { | ||
process { | ||
""" | ||
// TODO nf-core: define inputs of the process here. Example: | ||
|
||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file( "https://raw.githubusercontent.com/genetics-statistics/GEMMA/master/example/mouse_hs1940.geno.txt.gz", checkIfExists: true) | ||
|
||
] | ||
input[1] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file( "https://raw.githubusercontent.com/genetics-statistics/GEMMA/master/example/mouse_hs1940.pheno.txt", checkIfExists: true), | ||
Comment on lines
+22
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you bring those to the test-datasets repository? Or check if there is suitable test-data over there? |
||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
// TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. | ||
test("gwas - vcf - pheno - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
// TODO nf-core: define inputs of the process here. Example: | ||
|
||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file( "https://raw.githubusercontent.com/genetics-statistics/GEMMA/master/example/mouse_hs1940.geno.txt.gz", checkIfExists: true) | ||
|
||
] | ||
input[1] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file( "https://raw.githubusercontent.com/genetics-statistics/GEMMA/master/example/mouse_hs1940.pheno.txt", checkIfExists: true), | ||
] | ||
|
||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
//TODO nf-core: Add all required assertions to verify the test output. | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"gwas - vcf - pheno - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.out.cXX.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,02383d9d5046a267d81f99463df55749" | ||
], | ||
"matrix": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.out.cXX.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,02383d9d5046a267d81f99463df55749" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.2" | ||
}, | ||
"timestamp": "2025-05-14T20:50:15.000374596" | ||
}, | ||
"gwas - vcf - pheno": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.out.cXX.txt:md5,83fbef03ff6c4e7e89bebd52ce9d11a6" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,02383d9d5046a267d81f99463df55749" | ||
], | ||
"matrix": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.out.cXX.txt:md5,83fbef03ff6c4e7e89bebd52ce9d11a6" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,02383d9d5046a267d81f99463df55749" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.2" | ||
}, | ||
"timestamp": "2025-05-14T20:50:01.233003706" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not want to introduce changes to this files with a new module PR :)