Skip to content
Merged

Anarcii #11058

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a775032
anarcii prettier
Clara0611 Mar 26, 2026
00cca79
anarcii final
Clara0611 Mar 26, 2026
5b4a372
fixed singularity path
Clara0611 Mar 26, 2026
d6d704f
env.yml prettier
Clara0611 Mar 26, 2026
e5492d5
new snapshot
Clara0611 Mar 26, 2026
19bbc2d
Merge branch 'master' into anarcii
Clara0611 Mar 26, 2026
91e0f56
Merge branch 'master' into anarcii
Clara0611 Mar 27, 2026
8926c88
updated snapshot
Clara0611 Mar 27, 2026
22fabcc
updated singularity container
Clara0611 Mar 27, 2026
8798baa
Merge branch 'master' into anarcii
mapo9 Mar 27, 2026
f0364d7
added proper testdata
Clara0611 Mar 30, 2026
825c1b2
Merge branch 'master' into anarcii
Clara0611 Mar 30, 2026
f8dd26f
Merge branch 'anarcii' of https://github.com/Clara0611/modules into a…
Clara0611 Mar 30, 2026
6cebbad
changed tests to only compare header lines as scores will differ slig…
Clara0611 Mar 30, 2026
52b63e3
leaving numbering out of the test
Clara0611 Mar 30, 2026
d5977ea
minimal test change
Clara0611 Mar 30, 2026
84086f7
end of file fix (prettier)
Clara0611 Mar 30, 2026
306fd55
Merge branch 'master' into anarcii
Clara0611 Mar 30, 2026
a65bad2
Merge branch 'master' into anarcii
Clara0611 Mar 31, 2026
7fde0c4
deleted obsolete config
Clara0611 Mar 31, 2026
e4255d9
Update modules/nf-core/anarcii/main.nf
Clara0611 Apr 1, 2026
8c878e3
Update modules/nf-core/anarcii/tests/main.nf.test
Clara0611 Apr 1, 2026
b2ee9f3
Update modules/nf-core/anarcii/main.nf
Clara0611 Apr 1, 2026
1e9bb3e
Merge branch 'master' into anarcii
Clara0611 Apr 1, 2026
ce1aba9
changes made by prettier
Clara0611 Apr 1, 2026
b0f033c
Merge branch 'master' into anarcii
Clara0611 Apr 7, 2026
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
9 changes: 9 additions & 0 deletions modules/nf-core/anarcii/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "conda-forge::pip=26.0.1"
- pip:
- anarcii==2.0.5
38 changes: 38 additions & 0 deletions modules/nf-core/anarcii/main.nf
Comment thread
famosab marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
process ANARCII {
tag "${meta.id}"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity'
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/c5/c56cb3320588978063f0893876f4f2b6f088dadc75628f60a746ee54e72350a6/data'
: 'community.wave.seqera.io/library/python_pip_anarcii:4e5c3ffabd22d3fc'}"

input:
tuple val(meta), path(fasta)

output:
tuple val(meta), path("*.csv"), emit: anarcii
tuple val("${task.process}"), val('anarcii'), eval('anarcii --version | sed "s/^anarcii //"'), topic: versions, emit: versions_anarcii

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
anarcii \\
${args}\\
-o ${prefix}.csv \\
${fasta}
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo ${args}

touch ${prefix}.csv
"""
}
67 changes: 67 additions & 0 deletions modules/nf-core/anarcii/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "anarcii"
description: A language model for antigen receptor numbering
keywords:
- annotate
- antibody
- TCR
- immunology
tools:
- "anarcii":
description: "A language model for antigen receptor numbering"
homepage: "https://github.com/oxpig/ANARCII"
documentation: "https://github.com/oxpig/ANARCII/wiki"
tool_dev_url: "https://github.com/oxpig/ANARCII"
doi: "10.5281/zenodo.15274840"
licence:
- "BSD 3-Clause License"
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- fasta:
type: file
description: Fasta file with full receptor sequences
pattern: "*.fasta"
ontologies:
- edam: http://edamontology.org/format_1929
output:
anarcii:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*.csv":
type: file
description: File containing per-base numbering
pattern: "*.csv"
ontologies:
- edam: http://edamontology.org/format_3752
versions_anarcii:
- - ${task.process}:
type: string
description: The name of the process
- anarcii:
type: string
description: The name of the tool
- anarcii --version | sed "s/^anarcii //":
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- anarcii:
type: string
description: The name of the tool
- anarcii --version | sed "s/^anarcii //":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@Clara0611"
maintainers:
- "@Clara0611"
60 changes: 60 additions & 0 deletions modules/nf-core/anarcii/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// nf-core modules test anarcii
nextflow_process {

name "Test Process ANARCII"
script "../main.nf"
process "ANARCII"

tag "modules"
tag "modules_nfcore"
tag "anarcii"

test("human - fasta") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/anarcii/anarcii_vdjdb.fasta', checkIfExists: true),
]
"""
}
}

then {
assert process.success
def anarciiResults = path(process.out.anarcii.get(0).get(1)).csv
assert "Name" in anarciiResults.columnNames
assert "Chain" in anarciiResults.columnNames
assert "Score" in anarciiResults.columnNames
assert "Query start" in anarciiResults.columnNames
assert "Query end" in anarciiResults.columnNames
Comment on lines +27 to +32
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def anarciiResults = path(process.out.anarcii.get(0).get(1)).csv
assert "Name" in anarciiResults.columnNames
assert "Chain" in anarciiResults.columnNames
assert "Score" in anarciiResults.columnNames
assert "Query start" in anarciiResults.columnNames
assert "Query end" in anarciiResults.columnNames
assert path(process.out.anarcii[0][1]).csv.columnNames == ["Name", "Chain", "Score", "Query start", "Query end"]

or are the optionally more column names?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 128+ other columns corresponding to the numbering, which depends on the dataset. I can find out which exact numbering (includes alternatives sometimes, like 112A, 112B etc) this test data set produces, but I thought that including all of those would be hard to read and not representative of the tool, only of this specific test dataset. However, if you feel I should include them, it is possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you still struggling with instable md5sums even after updating the test data?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, unfortunately while the scores look better, they are still not 100% stable across systems

}
}

test("human - fasta - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/anarcii/anarcii_vdjdb.fasta', checkIfExists: true),
]
"""
}
}

then {
assert process.success
assertAll(
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

}

}
28 changes: 28 additions & 0 deletions modules/nf-core/anarcii/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"human - fasta - stub": {
"content": [
{
"anarcii": [
[
{
"id": "test"
},
"test.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_anarcii": [
[
"ANARCII",
"anarcii",
"2.0.5"
]
]
}
],
"timestamp": "2026-04-01T14:42:12.168257534",
"meta": {
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
}
}
Loading