Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3454005
Merge pull request #233 from mskcc-omics-workflows/develop
nikhil Feb 9, 2026
70f2c5d
Fix NF 25.04.0 heredoc compat: use tabs in END_VERSIONS blocks
johnoooh Feb 13, 2026
8adfa0b
Revert tab fix for modules not used by neoantigen pipeline
johnoooh Feb 16, 2026
0f06600
Merge pull request #237 from mskcc-omics-workflows/fix/nf-25-heredoc-…
nikhil Feb 16, 2026
e01dcb9
Increased memory for input process
nikhil Feb 16, 2026
b852f4e
Revert "Increased memory for input process"
nikhil Feb 16, 2026
895fc75
Increased resouce for neoantigen input
nikhil Feb 16, 2026
3f325c8
Merge pull request #238 from mskcc-omics-workflows/feature/bump_neoan…
nikhil Feb 16, 2026
8c7332d
Update file patterns in meta.yml for SV sequences
nikhil Feb 19, 2026
c123dec
Merge pull request #239 from mskcc-omics-workflows/feature/fix_neosv_…
nikhil Feb 19, 2026
8918c61
Fix PR #87 review issues: Python bug fixes and .nf module safety
johnoooh Feb 20, 2026
e2372b6
Revert set_model and epitope_dist logic changes in EpitopeDistance.py
johnoooh Feb 20, 2026
2de41a3
Revert all EpitopeDistance.py changes
johnoooh Feb 20, 2026
95c8dfe
Add verbose compression type checks for mutalyzer retriever
nikhil Apr 23, 2026
411e874
Merge pull request #243 from mskcc-omics-workflows/feature/update_mut…
nikhil Apr 23, 2026
98439a9
Updated generate_mutated_peptides workflow
nikhil Apr 23, 2026
f7d4cda
Some linting fixes
nikhil Apr 24, 2026
788d1fa
Fix frameshift identifier encoding to use alphanumeric-only codes
johnoooh Apr 30, 2026
c24edc9
Merge pull request #240 from mskcc-omics-workflows/fix/pr87-review
johnoooh May 6, 2026
e7459f2
Updated snap test files
nikhil May 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
16 changes: 8 additions & 8 deletions modules/msk/generatemutfasta/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ process GENERATEMUTFASTA {
--maf_file ${inputMaf}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
generateMutFasta: \$(echo \$(generateMutFasta.py -v))
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"${task.process}":
generateMutFasta: \$(echo \$(generateMutFasta.py -v))
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"""

stub:
Expand All @@ -53,9 +53,9 @@ process GENERATEMUTFASTA {
touch ${prefix}_out/${prefix}.WT.sequences.fa
touch ${prefix}_out/${prefix}_generate_mut_fasta.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
generateMutFasta: \$(echo \$(generateMutFasta.py -v))
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"${task.process}":
generateMutFasta: \$(echo \$(generateMutFasta.py -v))
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def main():
mutations.append(mut)

out_fa.close()
out_WT_fa.close()
debug_out_fa.close()

logger.info("\tMAF mutations summary")
Expand Down Expand Up @@ -208,11 +209,11 @@ def __init__(self, maf_row):

variant_type_map = {
"missense_mutation": "M",
"nonsense_nutation": "X",
"nonsense_mutation": "X",
"silent_mutation": "S",
"silent": "S",
"frame_shift_ins": "I+",
"frame_shift_del": "I-",
"frame_shift_ins": "Fi",
"frame_shift_del": "Fd",
"in_frame_ins": "If",
"in_frame_del": "Id",
"splice_site": "Sp",
Expand Down
16 changes: 8 additions & 8 deletions modules/msk/generatemutfasta/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"generatemutfasta - maf - fasta": {
"content": [
[
"versions.yml:md5,825989b899b3a496c7a3e3560389a424"
"versions.yml:md5,4fa5b9a30fd2979e399cd78fc2c8d9b9"
],
[
[
Expand All @@ -26,9 +26,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nextflow": "25.10.3"
},
"timestamp": "2026-02-09T15:03:37.884362"
"timestamp": "2026-04-30T16:46:35.278842"
},
"generatemutfasta - maf - fasta - stub": {
"content": [
Expand Down Expand Up @@ -61,7 +61,7 @@
]
],
"3": [
"versions.yml:md5,e653e8a2e136536d683b73afd3e0d00d"
"versions.yml:md5,4fa5b9a30fd2979e399cd78fc2c8d9b9"
],
"mut_fasta": [
[
Expand All @@ -82,7 +82,7 @@
]
],
"versions": [
"versions.yml:md5,e653e8a2e136536d683b73afd3e0d00d"
"versions.yml:md5,4fa5b9a30fd2979e399cd78fc2c8d9b9"
],
"wt_fasta": [
[
Expand All @@ -97,8 +97,8 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nextflow": "25.10.3"
},
"timestamp": "2026-02-09T15:03:51.569621"
"timestamp": "2026-04-30T16:46:48.069748"
}
}
}
45 changes: 33 additions & 12 deletions modules/msk/mutalyzer/retriever/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,35 @@ process MUTALYZER_RETRIEVER {
def prefix = task.ext.prefix ?: "${meta.id}"

"""
if ! bgzip --reindex ${fasta} > /dev/null 2>&1
then
# Re-compress fasta with bgzip

mv ${fasta} ${fasta.baseName}.tmp.gzip
gunzip -c ${fasta.baseName}.tmp.gzip | bgzip -c > ${fasta}

# Read first 3 bytes and route by magic: bgzip=1f8b08,gzip=1f8b08, bzip2=425a68.
# Plain-text FASTA/FASTQ commonly starts with '>' (3e) or '@' (40).
MAGIC=\$(head -c 3 "${fasta}" | od -An -tx1 | tr -d ' \n')

case "\$MAGIC" in
1f8b08)
if ! bgzip --reindex ${fasta} > /dev/null 2>&1; then
mv ${fasta} ${fasta.baseName}.tmp.gzip
gunzip -c ${fasta.baseName}.tmp.gzip | bgzip -c > ${fasta}
fi
;;
425a68)
mv ${fasta} ${fasta.baseName}.tmp.bzip2
bunzip2 -c "${fasta.baseName}.tmp.bzip2" | bgzip -c > ${fasta}
;;
3e*|40*)
mv ${fasta} ${fasta.baseName}.tmp
bgzip -c "${fasta.baseName}.tmp" > "${fasta}"
;;
*)
echo "ERROR: Unsupported input format for ${fasta}." >&2
echo " Expected: bgzip/gzip, bzip2, or plain-text FASTA/FASTQ." >&2
exit 1
;;
esac

bgzip --reindex ${fasta}
fi

# Build cache

Expand All @@ -44,9 +65,9 @@ process MUTALYZER_RETRIEVER {
tar -zcf ${prefix}.tar.gz cache/

cat <<-END_VERSIONS > versions.yml
"${task.process}":
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"${task.process}":
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"""

stub:
Expand All @@ -56,8 +77,8 @@ process MUTALYZER_RETRIEVER {
"""
touch ${prefix}.tar.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"${task.process}":
mutalyzer: \$(echo \$(mutalyzer_normalizer -v | tr '\n' ' ' | awk '{print \$3}'))
END_VERSIONS
"""
}
70 changes: 70 additions & 0 deletions modules/msk/mutalyzer/retriever/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,76 @@ nextflow_process {

}

test("MUTALYZER_RETRIEVER - bzip2 fasta - tar") {

when {

process {
"""

input[0] = [
[ id:'test' ], // meta map
file(params.test_data_mskcc['neoantigen']['small_test_chr2and16']['fa_bz2'], checkIfExists: true),
file(params.test_data_mskcc['neoantigen']['small_test_chr2and16']['gff3'], checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions, file(process.out.mutalyzer_cache[0]).name).match() }
)
}

}

test("MUTALYZER_RETRIEVER - unzipped fasta - tar") {

setup {
run("GUNZIP_FASTA") {
script "./setup.nf"
process {
"""

input = [
file(params.test_data_mskcc['neoantigen']['small_test_chr2and16']['fa_gzip'], checkIfExists: true)
]

"""
}

}
}

when {

process {
"""

input[0] = GUNZIP_FASTA.out.fasta.map { fa ->
[
[ id:'test' ], // meta map
fa,
file(params.test_data_mskcc['neoantigen']['small_test_chr2and16']['gff3'], checkIfExists: true)
]
}

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions, file(process.out.mutalyzer_cache[0]).name).match() }
)
}

}


test("MUTALYZER_RETRIEVER - fasta - tar - stub") {

Expand Down
44 changes: 35 additions & 9 deletions modules/msk/mutalyzer/retriever/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,66 @@
"MUTALYZER_RETRIEVER - bgzip fasta - tar": {
"content": [
[
"versions.yml:md5,03f8b4f0a527f3d4eb0f93aebf41774c"
"versions.yml:md5,4ab2d845297c3e2b5da08dcdfb597219"
],
"test.tar.gz"
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.0"
"nextflow": "25.10.4"
},
"timestamp": "2025-11-19T15:47:30.148934"
"timestamp": "2026-04-22T17:24:36.805516"
},
"MUTALYZER_RETRIEVER - gzip fasta - tar": {
"content": [
[
"versions.yml:md5,03f8b4f0a527f3d4eb0f93aebf41774c"
"versions.yml:md5,4ab2d845297c3e2b5da08dcdfb597219"
],
"test.tar.gz"
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.0"
"nextflow": "25.10.4"
},
"timestamp": "2025-11-19T15:48:41.373661"
"timestamp": "2026-04-22T17:26:20.666263"
},
"MUTALYZER_RETRIEVER - bzip2 fasta - tar": {
"content": [
[
"versions.yml:md5,4ab2d845297c3e2b5da08dcdfb597219"
],
"test.tar.gz"
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2026-04-23T10:36:15.363805"
},
"MUTALYZER_RETRIEVER - unzipped fasta - tar": {
"content": [
[
"versions.yml:md5,4ab2d845297c3e2b5da08dcdfb597219"
],
"test.tar.gz"
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2026-04-22T18:05:42.309498"
},
"MUTALYZER_RETRIEVER - fasta - tar - stub": {
"content": [
[
"versions.yml:md5,03f8b4f0a527f3d4eb0f93aebf41774c"
"versions.yml:md5,4ab2d845297c3e2b5da08dcdfb597219"
],
"test.tar.gz"
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.0"
"nextflow": "25.10.4"
},
"timestamp": "2025-11-19T15:48:45.850408"
"timestamp": "2026-04-22T17:26:43.924997"
}
}
14 changes: 14 additions & 0 deletions modules/msk/mutalyzer/retriever/tests/setup.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
process GUNZIP_FASTA {
container "ghcr.io/mskcc-omics-workflows/neoantigen-utils-base:1.4.0"

input:
path fasta_gzip

output:
path "unzipped.fa", emit: fasta

script:
"""
gunzip -c ${fasta_gzip} > unzipped.fa
"""
}
12 changes: 6 additions & 6 deletions modules/msk/neoantigenediting/aligntoiedb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ process NEOANTIGENEDITING_ALIGNTOIEDB {


cat <<-END_VERSIONS > versions.yml
"${task.process}":
neoantigenEditing: \$NEOANTIGEN_EDITING_TAG
END_VERSIONS
"${task.process}":
neoantigenEditing: \$NEOANTIGEN_EDITING_TAG
END_VERSIONS
"""

stub:
Expand All @@ -42,8 +42,8 @@ process NEOANTIGENEDITING_ALIGNTOIEDB {
touch iedb_alignments_example.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
neoantigenEditing: \$NEOANTIGEN_EDITING_TAG
END_VERSIONS
"${task.process}":
neoantigenEditing: \$NEOANTIGEN_EDITING_TAG
END_VERSIONS
"""
}
Loading
Loading