-
Notifications
You must be signed in to change notification settings - Fork 1k
Plinkpca #7981
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
Merged
Merged
Plinkpca #7981
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
5f97924
Module for PCA
23afb24
Module for PCA
72dd438
Module for PCA
f50d768
Module for PCA
ffd2b08
Module for PCA
0e1e3fd
testing conda
da6e525
plinkpca
6e37577
Fixed ivar modules (#7868)
saramonzon 1f6783d
Update FastK + MerquryFK versions + allow conda, add merquryfk/hapmak…
prototaxites e9353a3
Fix rnaseq preprocessing: don't trim with bad linting (#7881)
pinin4fjords 0ab89de
Update versions for motus/preplong (#7854)
sofstam 5dda446
Fixed conda channel order for fq module (#7871) (#7873)
delagoya a458f0c
New module: `khmer/trimlowabund` (#7806)
zachary-foster 5dc83a2
Added cram output to samtools/fixmate (#7820)
GallVp d568ac8
Migrate `ATAQV/MKARV` to nf-test (#7893)
LouisLeNezet 8191ef8
Added repeatmasker/repeatmasker (#7825)
GallVp a6df749
Added mdust (#7823)
GallVp 16c711a
Added agat/spfilterbyorfsize (#7822)
GallVp 652754a
Migrate `authentict/deam2cont` to nf-test (#7947)
LouisLeNezet f7e7c63
Migrate `BAMTOOLS/CONVERT` to nf-test (#7958)
LouisLeNezet 942af14
Updated deevariant to avoid failing nf-test (#7960)
scorreard edff87d
answer review Edo
8ebe44d
fixing logfile
3740d03
Merge branch 'master' into plinkpca
bruno-ariano 251685e
Merge branch 'master' into plinkpca
bruno-ariano 074d806
Merge branch 'master' into plinkpca
bruno-ariano f032314
fixing variable name bug
7c01fc9
Merge branch 'master' into plinkpca
bruno-ariano 49663f3
rebasing
d6459b6
fixing variable name bug
c05d80b
fixing variable name bug
18c0f59
Merge branch 'master' into plinkpca
bruno-ariano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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::plink2=2.00a5.10" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| process PLINK2_PCA { | ||
| 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/plink2:2.00a5.10--h4ac6f70_0' | ||
| : 'biocontainers/plink2:2.00a5.10--h4ac6f70_0'}" | ||
|
|
||
| input: | ||
| tuple val(meta), val(npcs), val(use_approx), path(pgen), path(psam), path(pvar) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.eigenvec"), emit: evecfile | ||
| tuple val(meta), path("*.eigenval"), emit: evfile | ||
| tuple val(meta), path("*.log"), emit: logfile | ||
| 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}" | ||
| def approx_option = use_approx ? "approx" : "" | ||
| def n_pcs = npcs ? npcs : 10 | ||
| """ | ||
| plink2 \\ | ||
| --pca ${n_pcs} ${approx_option} \\ | ||
| --memory ${task.memory.toMega()} \\ | ||
| $args \\ | ||
| --threads $task.cpus \\ | ||
|
bruno-ariano marked this conversation as resolved.
|
||
| --pfile ${pgen.baseName} \\ | ||
| --out ${prefix} | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| plinkpca: \$(plink2 --version |& sed '1!d ; s/plink2 //') | ||
| END_VERSIONS | ||
| """ | ||
| stub: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| touch ${prefix}.eigenvec ${prefix}.eigenval | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| plink2: \$(plink2 --version 2>&1 | sed 's/^PLINK v//; s/ 64.*\$//' ) | ||
| END_VERSIONS | ||
| """ | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "plink2_pca" | ||
| description: Perform PCA analysis using PLINK | ||
| keywords: | ||
| - plink2 | ||
| - pca | ||
| - plink2_pca | ||
|
|
||
| tools: | ||
| - plink2: | ||
| description: | | ||
| Whole genome association analysis toolset, designed to perform a range | ||
| of basic, large-scale analyses in a computationally efficient manner | ||
| homepage: http://www.cog-genomics.org/plink/2.0/ | ||
| documentation: http://www.cog-genomics.org/plink/2.0/general_usage | ||
| doi: "10.1186/s13742-015-0047-8" | ||
| licence: ["GPL v3"] | ||
| identifier: "" | ||
|
|
||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - npcs: | ||
| type: integer | ||
| description: Number of PCs to compute | ||
| - use_approx: | ||
| type: boolean | ||
| description: If true, use the approximate method | ||
| - pgen: | ||
| type: file | ||
| description: PLINK 2 binary genotype table | ||
| pattern: "*.{pgen}" | ||
| - psam: | ||
| type: file | ||
| description: PLINK 2 sample information file | ||
| pattern: "*.{psam}" | ||
| - pvar: | ||
| type: file | ||
| description: PLINK 2 variant information file | ||
| pattern: "*.{pvar}" | ||
|
|
||
| output: | ||
| - evecfile: | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| pattern: "*.eigenvec" | ||
| - "*.eigenvec": | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| pattern: "*.eigenvec" | ||
| - evfile: | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| pattern: "*.eigenval" | ||
| - "*.eigenval": | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| pattern: "*.eigenval" | ||
| - logfile: | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| pattern: "*.log" | ||
| - "*.log": | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| pattern: "*.log" | ||
| - versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: | | ||
| File containing the version of the program | ||
| pattern: "versions.yml" | ||
| authors: | ||
| - "@bruno-ariano" | ||
| maintainers: | ||
| - "@bruno-ariano" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process PLINK2_PCA" | ||
| script "../main.nf" | ||
| process "PLINK2_PCA" | ||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "plink2" | ||
| tag "plink2/pca" | ||
|
|
||
| test("plink2_pca") { | ||
| config "./nextflow.config" | ||
| when { | ||
| params { | ||
| outdir = "$outputDir" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id: 'pca' ], // meta map! | ||
| 10, | ||
| true, | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.pgen', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.pvar', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.psam', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert process.out.evecfile.get(0).get(1) ==~ ".*.eigenvec" }, | ||
| { assert process.out.evfile.get(0).get(1) ==~ ".*.eigenval" }, | ||
| { assert process.out.logfile.get(0).get(1) ==~ ".*.log" }, | ||
| { assert snapshot(process.out.versions).match("versions") } | ||
|
|
||
| ) | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versions": { | ||
| "content": [ | ||
| [ | ||
| "versions.yml:md5,6aad532ec6f7666e23d269c394e1d796" | ||
| ] | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.2", | ||
| "nextflow": "24.10.5" | ||
| }, | ||
| "timestamp": "2025-03-26T14:48:24.762736992" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /* | ||
| ======================================================================================== | ||
| Nextflow config file for running tests | ||
| ======================================================================================== | ||
| */ | ||
| process { | ||
| withName: PLINK2_PCA { | ||
| ext.prefix = { "${meta.id}.pca" } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| plink2/pca: | ||
| - modules/nf-core/plink2/pca/** |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.