Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 15 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# Compiled class file
*.class
.nextflow*
work/
data/
results/
.DS_Store
testing/
testing*
*.pyc
null/
\#*

# Log file
*.log
# NF-test
.nf-test/
.nf-test/*
.nf-test*

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
modules/nf-core
34 changes: 34 additions & 0 deletions modules/UMCUGenetics/ancestry_knn/calc/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
process ANCESTRY_KNN {
tag "${meta.id}"
label "process_medium"

container "ghcr.io/astral-sh/uv:python3.13-bookworm"

input:
tuple val(meta), path(eigenvec)
tuple val(meta2), path(ref_metadata)

output:
tuple val(meta), path("*_knn.tsv"), emit: knn_tsv
tuple val(meta), path("*_knn_pca.png"), emit: knn_pca_plot, optional: true
tuple val("${task.process}"), val('ancestry_knn'), eval('echo 1.0.0'), emit: versions_ancestry_knn, topic: versions

script:
def prefix = task.ext.prefix ?: meta.id
def args = task.ext.args ?: ""
"""
knn.py \
--eig ${eigenvec} \\
--labels ${ref_metadata} \\
${args} \\
--plot-output ${prefix}_knn_pca.png \\
--output ${prefix}_knn.tsv
"""

stub:
def prefix = task.ext.prefix ?: meta.id
"""
touch ${prefix}_knn.tsv
touch ${prefix}_knn_pca.png
"""
}
Loading
Loading