Skip to content
Open
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
4 changes: 3 additions & 1 deletion modules/nf-core/anarcii/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ process ANARCII {
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine in ['singularity', 'apptainer']
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? '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)
val seq_type

output:
tuple val(meta), path("*.csv"), emit: anarcii
Expand All @@ -22,6 +23,7 @@ process ANARCII {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
anarcii \\
-t ${seq_type} \\
${args}\\
-o ${prefix}.csv \\
${fasta}
Expand Down
5 changes: 5 additions & 0 deletions modules/nf-core/anarcii/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ input:
pattern: "*.fasta"
ontologies:
- edam: http://edamontology.org/format_1929
- seq_type:
type: string
description: |
Receptor type to number, passed to ANARCII's `-t` flag. Selects the model used for alignment.
pattern: "antibody|tcr|vnar|vhh|shark|unknown"
output:
anarcii:
- - meta:
Expand Down
13 changes: 13 additions & 0 deletions modules/nf-core/anarcii/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ nextflow_process {
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/anarcii/anarcii_vdjdb.fasta', checkIfExists: true),
]
input[1] = 'tcr'
"""
}
}
Expand All @@ -30,6 +31,17 @@ nextflow_process {
assert "Score" in anarciiResults.columnNames
assert "Query start" in anarciiResults.columnNames
assert "Query end" in anarciiResults.columnNames
// A mismatched seq_type leaves sequences unnumbered as chain "F" instead of failing
assert anarciiResults.columns["Chain"].every { it in ["A", "B"] }
// Score drifts with thread count, so the file md5 is not portable across machines
assert snapshot(
anarciiResults.columnNames.sort(),
anarciiResults.columns["Name"],
anarciiResults.columns["Chain"],
anarciiResults.columns["Query start"],
anarciiResults.columns["Query end"],
process.out.versions_anarcii
).match()
}
}

Expand All @@ -44,6 +56,7 @@ nextflow_process {
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/anarcii/anarcii_vdjdb.fasta', checkIfExists: true),
]
input[1] = 'tcr'
"""
}
}
Expand Down
203 changes: 203 additions & 0 deletions modules/nf-core/anarcii/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,207 @@
{
"human - fasta": {
"content": [
[
"1",
"10",
"100",
"101",
"102",
"103",
"104",
"105",
"106",
"107",
"108",
"109",
"11",
"110",
"111",
"111A",
"111B",
"112",
"112A",
"112B",
"113",
"114",
"115",
"116",
"117",
"118",
"119",
"12",
"120",
"121",
"122",
"123",
"124",
"125",
"126",
"127",
"128",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"2",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"3",
"30",
"31",
"32",
"33",
"34",
"35",
"36",
"37",
"38",
"39",
"4",
"40",
"41",
"42",
"43",
"44",
"45",
"46",
"47",
"48",
"49",
"5",
"50",
"51",
"52",
"53",
"54",
"55",
"56",
"57",
"58",
"59",
"6",
"60",
"61",
"62",
"63",
"64",
"65",
"66",
"67",
"68",
"69",
"7",
"70",
"71",
"72",
"73",
"74",
"75",
"76",
"77",
"78",
"79",
"8",
"80",
"81",
"82",
"83",
"84",
"85",
"86",
"87",
"88",
"89",
"9",
"90",
"91",
"92",
"93",
"94",
"95",
"96",
"97",
"98",
"99",
"Chain",
"Name",
"Query end",
"Query start",
"Score"
],
[
"298|TRA",
"298|TRB",
"299|TRA",
"299|TRB",
"300|TRA",
"300|TRB",
"301|TRA",
"301|TRB",
"302|TRA",
"302|TRB"
],
[
"A",
"B",
"A",
"B",
"A",
"B",
"A",
"B",
"A",
"B"
],
[
20,
19,
19,
19,
20,
19,
18,
19,
18,
19
],
[
133,
133,
132,
131,
135,
137,
130,
130,
130,
133
],
[
[
"ANARCII",
"anarcii",
"2.0.5"
]
]
],
"timestamp": "2026-08-26T11:14:14.316916324",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
},
"human - fasta - stub": {
"content": [
{
Expand Down