Skip to content

Commit 6ff3f9d

Browse files
bruno-arianoBruno Arianosaramonzonprototaxitespinin4fjords
committed
Plinkpca (nf-core#7981)
* Module for PCA * Module for PCA * Module for PCA * Module for PCA * Module for PCA * testing conda * plinkpca * Fixed ivar modules (nf-core#7868) * fixed ivar variants module * updated snapshot ivar variants because versions change * fixed ivar consensus module * simplified snapshot for consensus test, same as ivar variants module * simplified snapshot for trim test, same as ivar variants module * updated snapshot for ivar trim and consensus modules * removed empty log file in ivar trim in snapshot * updated ivar version to last one * updated version also in conda env * updated version also in conda env in ivar consensus and variants * updated container version for ivar consensus and variants * updated snapshots again * Update FastK + MerquryFK versions + allow conda, add merquryfk/hapmaker module, port to nf-test (nf-core#7847) * Start updating FastK modules to allow conda * Migrate all Merquryfk modules to nf-test * Update to container with explicit R * Fix container for FastK * Start fixing fastk modules * Fix FastK tests, add merquryfk/hapmaker module * Fix linting for some merquryFK modules * Fix merquryfk/merquryfk linting * Fix linting for everything except hapmaker * Fix snapshots? * Update tests * Fix tests pt 1000 * Sort fastk/merge test inputs to try and ensure repeatability * Rename output channels to avoid linting error * Fix hapmaker snapshot * Harshill alignment * Stub output format determined by args; add details to meta.yml files to disambiguate meta maps * Remove def again from variables - causes error otherwise * Fix Fastk/merge stub * Update snapshot * Fix rnaseq preprocessing: don't trim with bad linting (nf-core#7881) * Update versions for motus/preplong (nf-core#7854) * Update versions for motus preplong * Update modules/nf-core/motus/preplong/main.nf Co-authored-by: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> * Versions * Add tests for downloaddb * Add snapshot * Update to the latest motus merge * Update motus merge * Remove pytest * Update pytest * Update downloaddb * Update modules/nf-core/motus/downloaddb/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/motus/preplong/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Add stub * Add stub --------- Co-authored-by: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Fixed conda channel order for fq module (nf-core#7871) (nf-core#7873) * Fixed conda channel order for fq module (nf-core#7871) By listing bioconda as the primary channel, the fq package can be installed and used in conda environments. modified: modules/nf-core/fq/generate/environment.yml modified: modules/nf-core/fq/lint/environment.yml modified: modules/nf-core/fq/subsample/environment.yml * added channel order comment to avoid a regression --------- Co-authored-by: Angel Pizarro <pizarroa@amazon.com> * New module: `khmer/trimlowabund` (nf-core#7806) * add khmer/trimlowabund * use evironment.yml * chore(deps): update tj-actions/changed-files action to v46 (nf-core#7809) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Added coreograph nf-test (nf-core#7812) coreograph nf-test * Added ilastik/multicut nftest (nf-core#7811) * main.nf changes * finished test * Update `graphtyper/vcfconcatenate`: Add batching to avoid long command line error (nf-core#7805) add batching to vcfconcatenate to avoid long command line error Co-authored-by: Zachary Foster <fosterz@pop-os.localdomain> * basicpy nf-test (nf-core#7772) * basicpy nf-test * removed leftover pytest * separate output files * updated meta * separated outputs * adapted test * adapted inputs and snapshot * removed pytest files --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Clair3 (nf-core#7765) * Adds Clair3 * Removes TODOs and changes container urls * Changes bash command * Removes useless code lines * Removes TODO statements * Update meta.yml adds more file info to meta.yml * Update main.nf.test removes TODO and updates clair3 model directory * Update meta.yml fixes doi link * Add suggestions and changes data pulling * Fix main.nf.test adds correct structure to pass data to main * fix yaml * fix yaml final one * Update test snapshot * Fix snapshot * Fix tests * Update modules/nf-core/clair3/main.nf Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> * Update modules/nf-core/clair3/main.nf Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> * Update modules/nf-core/clair3/main.nf Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> * Update modules/nf-core/clair3/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/clair3/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/clair3/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/clair3/meta.yml Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Change meta description * Update meta * Update meta * update screenshot * Update modules/nf-core/clair3/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --------- Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * chore(deps): update github actions (nf-core#7796) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Change file name for severus_somatic.vcf (nf-core#7814) * Change file name for severus_somatic.vcf * Update snapshot * Update yaml * Clean up hifiasm module + add bin file input (nf-core#7802) * Tidy hifiasm model + update tests * Update nf.test * Fix linting * Add fasta and PAF outputs to hifiasm; combine all bin files into a single output channel. Update documentation * Improve descriptiveness of output channel names * fix samtools/convert stub (nf-core#7816) * add default memory if task.memory is not set * Update modules/nf-core/khmer/trimlowabund/meta.yml Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/khmer/trimlowabund/meta.yml Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update `sourmash/compare`: Name output by prefix and update conda/docker (nf-core#7808) * update sourmash/compare so output is named by prefix * add stub to sourmash/sketch * Update modules/nf-core/sourmash/sketch/tests/main.nf.test Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * move test for sourmash/gather from pytest to nf-test * migrated sourmash taxannotate to nf-test --------- Co-authored-by: Zachary Foster <fosterz@pop-os.localdomain> Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * add Subworkflow linting step to CI (nf-core#7835) add swf linting step * Add missing swf change detection (nf-core#7836) * add swf linting step * add missing change detection for subworkflows * Add bedtools/shuffle module (nf-core#7803) * Add bedtools/shuffle module * Make linter happy * Update test snapshots for bedtools/shuffle * add new ARCHIVE_EXTRACT subworkflow (nf-core#7817) * add new subworkflow * rename * fix tags * add basic meta.yml * better comments * Update subworkflows/nf-core/archive_extract/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * APPLYBQSR output line specificity (nf-core#7818) * updated output line and snap file * linting fix in meta * Trying out RunsOn runners (nf-core#7840) * Trying out RunsOn runners * try older image * add debugging * fix action * pin setup-apptainer * add gpu test * fix usage syntax * switch from docker_self_hosted to docker * remove test comments * Fix language server error in salmon/quant (nf-core#7843) * New module: `busco/download` (nf-core#7788) * add busco/download * add author/maintainer * update tests snap for new conda version * revert to older conda version to match container versions * update tests * add stub * removed unneeded code in stub --------- Co-authored-by: Zachary Foster <fosterz@pop-os.localdomain> * Fix language server errors in arriba/arriba (nf-core#7845) * name output by prefix * set to process_medium * check if input and output file are the same * make sure regex matches only part of string * Update modules/nf-core/khmer/trimlowabund/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/khmer/trimlowabund/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * apply changes made to file path handeling to stub * Update modules/nf-core/khmer/trimlowabund/meta.yml * Update modules/nf-core/khmer/trimlowabund/meta.yml --------- Co-authored-by: Zachary Foster <fosterz@pop-os.localdomain> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Krešimir Beštak <86408271+kbestak@users.noreply.github.com> Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Co-authored-by: robert-a-forsyth <robert.alexander.forsyth@gmail.com> Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> Co-authored-by: Jim Downie <19718667+prototaxites@users.noreply.github.com> Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com> Co-authored-by: Igor Trujnara <53370556+itrujnara@users.noreply.github.com> Co-authored-by: Maxime U Garcia <max.u.garcia@gmail.com> Co-authored-by: John Orgera <65687576+johnoooh@users.noreply.github.com> * Added cram output to samtools/fixmate (nf-core#7820) * Added cram output to samtools/fixmate * Fixed tag * Fixed tag * Fixed linting * Updated onts * Use nft-bam, update output glob * Fixed meta.yml --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Migrate `ATAQV/MKARV` to nf-test (nf-core#7893) Migrate to nf-test Co-authored-by: LouisLeNezet <louislenezet@gmaio.com> * Added repeatmasker/repeatmasker (nf-core#7825) * Added repeatmasker/repeatmasker * Added onts * Added mdust (nf-core#7823) * Added mdust * Responded to review * Added agat/spfilterbyorfsize (nf-core#7822) * Added agat/spfilterbyorfsize * Added Gff tests * Migrate `authentict/deam2cont` to nf-test (nf-core#7947) * Update to nf-test * Fix samtools version * Update modules/nf-core/authentict/deam2cont/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/authentict/deam2cont/tests/main.nf.test Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/authentict/deam2cont/tests/main.nf.test Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Migrate `BAMTOOLS/CONVERT` to nf-test (nf-core#7958) * Migrate to nf-test * Update modules/nf-core/bamtools/convert/main.nf Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> * Update modules/nf-core/bamtools/convert/tests/main.nf.test Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> * Update modules/nf-core/bamtools/convert/tests/main.nf.test Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> * Update modules/nf-core/bamtools/convert/tests/main.nf.test Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> * Update variable names * Fix spacing --------- Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> * Updated deevariant to avoid failing nf-test (nf-core#7960) Updated the main to avoid failing nf-test * answer review Edo * fixing logfile * fixing variable name bug * rebasing * fixing variable name bug * fixing variable name bug --------- Co-authored-by: Bruno Ariano <bruno.ariano@fht.org> Co-authored-by: Sara Monzón <sara.monzon.fdz@gmail.com> Co-authored-by: Jim Downie <19718667+prototaxites@users.noreply.github.com> Co-authored-by: Jonathan Manning <jonathan.manning@seqera.io> Co-authored-by: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Co-authored-by: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Co-authored-by: Angel Pizarro <delagoya@gmail.com> Co-authored-by: Angel Pizarro <pizarroa@amazon.com> Co-authored-by: Zachary Foster <zacharyfoster1989@gmail.com> Co-authored-by: Zachary Foster <fosterz@pop-os.localdomain> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Krešimir Beštak <86408271+kbestak@users.noreply.github.com> Co-authored-by: robert-a-forsyth <robert.alexander.forsyth@gmail.com> Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com> Co-authored-by: Igor Trujnara <53370556+itrujnara@users.noreply.github.com> Co-authored-by: Maxime U Garcia <max.u.garcia@gmail.com> Co-authored-by: John Orgera <65687576+johnoooh@users.noreply.github.com> Co-authored-by: Usman Rashid <usman@smme.edu.pk> Co-authored-by: Louis Le Nézet <58640615+LouisLeNezet@users.noreply.github.com> Co-authored-by: LouisLeNezet <louislenezet@gmaio.com> Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> Co-authored-by: Solenne Correard <54953390+scorreard@users.noreply.github.com>
1 parent 320f6ac commit 6ff3f9d

7 files changed

Lines changed: 215 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::plink2=2.00a5.10"

modules/nf-core/plink2/pca/main.nf

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
process PLINK2_PCA {
2+
tag "$meta.id"
3+
label 'process_single'
4+
conda "${moduleDir}/environment.yml"
5+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
6+
? 'https://depot.galaxyproject.org/singularity/plink2:2.00a5.10--h4ac6f70_0'
7+
: 'biocontainers/plink2:2.00a5.10--h4ac6f70_0'}"
8+
9+
input:
10+
tuple val(meta), val(npcs), val(use_approx), path(pgen), path(psam), path(pvar)
11+
12+
output:
13+
tuple val(meta), path("*.eigenvec"), emit: evecfile
14+
tuple val(meta), path("*.eigenval"), emit: evfile
15+
tuple val(meta), path("*.log"), emit: logfile
16+
path "versions.yml", emit: versions
17+
18+
19+
when:
20+
task.ext.when == null || task.ext.when
21+
22+
script:
23+
def args = task.ext.args ?: ''
24+
def prefix = task.ext.prefix ?: "${meta.id}"
25+
def approx_option = use_approx ? "approx" : ""
26+
def n_pcs = npcs ? npcs : 10
27+
"""
28+
plink2 \\
29+
--pca ${n_pcs} ${approx_option} \\
30+
--memory ${task.memory.toMega()} \\
31+
$args \\
32+
--threads $task.cpus \\
33+
--pfile ${pgen.baseName} \\
34+
--out ${prefix}
35+
36+
cat <<-END_VERSIONS > versions.yml
37+
"${task.process}":
38+
plinkpca: \$(plink2 --version |& sed '1!d ; s/plink2 //')
39+
END_VERSIONS
40+
"""
41+
stub:
42+
def args = task.ext.args ?: ''
43+
def prefix = task.ext.prefix ?: "${meta.id}"
44+
"""
45+
touch ${prefix}.eigenvec ${prefix}.eigenval
46+
47+
cat <<-END_VERSIONS > versions.yml
48+
"${task.process}":
49+
plink2: \$(plink2 --version 2>&1 | sed 's/^PLINK v//; s/ 64.*\$//' )
50+
END_VERSIONS
51+
"""
52+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
2+
name: "plink2_pca"
3+
description: Perform PCA analysis using PLINK
4+
keywords:
5+
- plink2
6+
- pca
7+
- plink2_pca
8+
9+
tools:
10+
- plink2:
11+
description: |
12+
Whole genome association analysis toolset, designed to perform a range
13+
of basic, large-scale analyses in a computationally efficient manner
14+
homepage: http://www.cog-genomics.org/plink/2.0/
15+
documentation: http://www.cog-genomics.org/plink/2.0/general_usage
16+
doi: "10.1186/s13742-015-0047-8"
17+
licence: ["GPL v3"]
18+
identifier: ""
19+
20+
input:
21+
- - meta:
22+
type: map
23+
description: |
24+
Groovy Map containing sample information
25+
e.g. [ id:'test', single_end:false ]
26+
- npcs:
27+
type: integer
28+
description: Number of PCs to compute
29+
- use_approx:
30+
type: boolean
31+
description: If true, use the approximate method
32+
- pgen:
33+
type: file
34+
description: PLINK 2 binary genotype table
35+
pattern: "*.{pgen}"
36+
- psam:
37+
type: file
38+
description: PLINK 2 sample information file
39+
pattern: "*.{psam}"
40+
- pvar:
41+
type: file
42+
description: PLINK 2 variant information file
43+
pattern: "*.{pvar}"
44+
45+
output:
46+
- evecfile:
47+
- meta:
48+
type: map
49+
description: |
50+
Groovy Map containing sample information
51+
pattern: "*.eigenvec"
52+
- "*.eigenvec":
53+
type: map
54+
description: |
55+
Groovy Map containing sample information
56+
pattern: "*.eigenvec"
57+
- evfile:
58+
- meta:
59+
type: map
60+
description: |
61+
Groovy Map containing sample information
62+
pattern: "*.eigenval"
63+
- "*.eigenval":
64+
type: map
65+
description: |
66+
Groovy Map containing sample information
67+
pattern: "*.eigenval"
68+
- logfile:
69+
- meta:
70+
type: map
71+
description: |
72+
Groovy Map containing sample information
73+
pattern: "*.log"
74+
- "*.log":
75+
type: map
76+
description: |
77+
Groovy Map containing sample information
78+
pattern: "*.log"
79+
- versions:
80+
- versions.yml:
81+
type: file
82+
description: |
83+
File containing the version of the program
84+
pattern: "versions.yml"
85+
authors:
86+
- "@bruno-ariano"
87+
maintainers:
88+
- "@bruno-ariano"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
nextflow_process {
2+
3+
name "Test Process PLINK2_PCA"
4+
script "../main.nf"
5+
process "PLINK2_PCA"
6+
tag "modules"
7+
tag "modules_nfcore"
8+
tag "plink2"
9+
tag "plink2/pca"
10+
11+
test("plink2_pca") {
12+
config "./nextflow.config"
13+
when {
14+
params {
15+
outdir = "$outputDir"
16+
}
17+
process {
18+
"""
19+
input[0] = [
20+
[ id: 'pca' ], // meta map!
21+
10,
22+
true,
23+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.pgen', checkIfExists: true),
24+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.pvar', checkIfExists: true),
25+
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.psam', checkIfExists: true)
26+
]
27+
"""
28+
}
29+
}
30+
31+
then {
32+
assertAll (
33+
{ assert process.success },
34+
{ assert process.out.evecfile.get(0).get(1) ==~ ".*.eigenvec" },
35+
{ assert process.out.evfile.get(0).get(1) ==~ ".*.eigenval" },
36+
{ assert process.out.logfile.get(0).get(1) ==~ ".*.log" },
37+
{ assert snapshot(process.out.versions).match("versions") }
38+
39+
)
40+
}
41+
}
42+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"versions": {
3+
"content": [
4+
[
5+
"versions.yml:md5,6aad532ec6f7666e23d269c394e1d796"
6+
]
7+
],
8+
"meta": {
9+
"nf-test": "0.9.2",
10+
"nextflow": "24.10.5"
11+
},
12+
"timestamp": "2025-03-26T14:48:24.762736992"
13+
}
14+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
========================================================================================
3+
Nextflow config file for running tests
4+
========================================================================================
5+
*/
6+
process {
7+
withName: PLINK2_PCA {
8+
ext.prefix = { "${meta.id}.pca" }
9+
}
10+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
plink2/pca:
2+
- modules/nf-core/plink2/pca/**

0 commit comments

Comments
 (0)