Skip to content

Commit bee1da8

Browse files
authored
Merge pull request #76 from mskcc/dev
Release 1.3.0
2 parents 56a1411 + 05dd8da commit bee1da8

File tree

37 files changed

+488
-491
lines changed

37 files changed

+488
-491
lines changed

conf/modules.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ process {
3232
withName: 'NEOANTIGENUTILS_NEOANTIGENINPUT' {
3333
ext.args = "--kD_cutoff ${params.kd_cutoff}"
3434
}
35+
36+
withName: 'NEOANTIGENEDITING_COMPUTEFITNESS' {
37+
ext.args = "--a_param ${params.compute_fitness_a} --k_param ${params.compute_fitness_k} --w_param ${params.compute_fitness_w}"
38+
}
3539
}

conf/prod.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ params {
3737
phylo_mcmc_samples = 2500
3838
phylo_num_chains = 15
3939
kd_cutoff = 500
40+
compute_fitness_a = 22.897590714815188
41+
compute_fitness_k = 1
42+
compute_fitness_w = 0.22402192838740312
4043

4144
iedbfasta = 'https://raw.githubusercontent.com/mskcc/NeoantigenEditing/refs/heads/main/data/iedb.fasta'
4245
cds = 'https://github.com/mskcc-omics-workflows/test-datasets/raw/neoantigen/neoantigen/Homo_sapiens.GRCh37.75.cds.all.fa.gz'
4346
cdna = 'https://github.com/mskcc-omics-workflows/test-datasets/raw/neoantigen/neoantigen/Homo_sapiens.GRCh37.75.cdna.all.fa.gz'
47+
gtf = 'https://github.com/mskcc-omics-workflows/test-datasets/raw/neoantigen/neoantigen/Homo_sapiens.GRCh37.75.gtf.gz'
4448
}

conf/test.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ params {
3333
phylo_num_chains = 2
3434
netmhc3 = true
3535
kd_cutoff = 500
36+
compute_fitness_a = 22.897590714815188
37+
compute_fitness_k = 1
38+
compute_fitness_w = 0.22402192838740312
3639

3740
iedbfasta = 'https://raw.githubusercontent.com/mskcc-omics-workflows/test-datasets/neoantigen/neoantigen/neoantigenEditing/data/iedb.fasta'
3841
cds = 'https://github.com/mskcc-omics-workflows/test-datasets/raw/neoantigen/neoantigen/Homo_sapiens.GRCh37.75.cds.all.fa.gz'
3942
cdna = 'https://github.com/mskcc-omics-workflows/test-datasets/raw/neoantigen/neoantigen/Homo_sapiens.GRCh37.75.cdna.all.fa.gz'
43+
gtf = 'https://github.com/mskcc-omics-workflows/test-datasets/raw/neoantigen/neoantigen/Homo_sapiens.GRCh37.75.gtf.gz'
4044
}

modules.json

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,44 +12,39 @@
1212
},
1313
"neoantigenediting/computefitness": {
1414
"branch": "develop",
15-
"git_sha": "05e49188ee9407e1b51dfb1a49d8b6133e9276bc",
15+
"git_sha": "6aee6083154c666798e779c0aeb305614f4dcdd3",
1616
"installed_by": ["modules", "neoantigen_editing"]
1717
},
1818
"neoantigenutils/convertannotjson": {
1919
"branch": "develop",
20-
"git_sha": "34505c4c67eabebab927561d3a8fca87c9efe788",
20+
"git_sha": "e8ae6eb203cb5a49f98cacd4734090c182ad5f44",
2121
"installed_by": ["modules"]
2222
},
2323
"neoantigenutils/formatnetmhcpan": {
2424
"branch": "develop",
25-
"git_sha": "939507da8ef974fa8b9f53abd5f9d54492bafab0",
25+
"git_sha": "84f51051ee6735fc9dc8eea733eb84a54dc350bc",
2626
"installed_by": ["modules", "netmhcstabandpan"]
2727
},
2828
"neoantigenutils/generatehlastring": {
2929
"branch": "develop",
30-
"git_sha": "34505c4c67eabebab927561d3a8fca87c9efe788",
30+
"git_sha": "84f51051ee6735fc9dc8eea733eb84a54dc350bc",
3131
"installed_by": ["modules", "netmhcstabandpan"]
3232
},
3333
"neoantigenutils/generatemutfasta": {
3434
"branch": "develop",
35-
"git_sha": "e6bbb12a2dc237b9ea18163e96dbe9d780ddce5f",
35+
"git_sha": "e8ae6eb203cb5a49f98cacd4734090c182ad5f44",
3636
"installed_by": ["modules", "netmhcstabandpan"]
3737
},
3838
"neoantigenutils/neoantigeninput": {
3939
"branch": "develop",
40-
"git_sha": "ba014f40a3aaccd6a78db44f62d697b77a790eb8",
40+
"git_sha": "8b8e8d28b628b6244f4539cc405f2561fd733967",
4141
"installed_by": ["modules"]
4242
},
4343
"netmhc3": {
4444
"branch": "develop",
45-
"git_sha": "0ccb264740ff8fe681f0e298133e52e51bf68994",
45+
"git_sha": "26ac6cb270844a72838220ca239a22fcbe7f71f2",
4646
"installed_by": ["modules", "netmhcstabandpan"]
4747
},
48-
"netmhcpan": {
49-
"branch": "main",
50-
"git_sha": "503abeb67260f060d8228221b07d743aa4180345",
51-
"installed_by": ["modules"]
52-
},
5348
"netmhcpan4": {
5449
"branch": "develop",
5550
"git_sha": "9e23d0e98023dec8b7a9b0faa20eea2f1f9cee3f",
@@ -62,7 +57,7 @@
6257
},
6358
"phylowgs/createinput": {
6459
"branch": "develop",
65-
"git_sha": "05e49188ee9407e1b51dfb1a49d8b6133e9276bc",
60+
"git_sha": "e8ae6eb203cb5a49f98cacd4734090c182ad5f44",
6661
"installed_by": ["phylowgs"]
6762
},
6863
"phylowgs/multievolve": {
@@ -86,12 +81,12 @@
8681
"msk": {
8782
"neoantigen_editing": {
8883
"branch": "develop",
89-
"git_sha": "56a628201401866096d6307b9e8c690c5eb46ac2",
84+
"git_sha": "3284d77f55f0ef756d9ccd0519826fd7edd7d2ec",
9085
"installed_by": ["subworkflows"]
9186
},
9287
"netmhcstabandpan": {
9388
"branch": "develop",
94-
"git_sha": "848ad2b5cffd9a4bd15a628cfe59aba93807a252",
89+
"git_sha": "e8ae6eb203cb5a49f98cacd4734090c182ad5f44",
9590
"installed_by": ["subworkflows"]
9691
},
9792
"phylowgs": {

modules/msk/neoantigenediting/computefitness/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ process NEOANTIGENEDITING_COMPUTEFITNESS {
2323
"""
2424
compute_fitness.py \\
2525
--alignment ${alignment_file} \\
26-
--input ${patient_data}
27-
26+
--input ${patient_data} \\
27+
${args}
2828
2929
cat <<-END_VERSIONS > versions.yml
3030
"${task.process}":

modules/msk/neoantigenediting/computefitness/resources/usr/bin/compute_fitness.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,19 +285,23 @@ def clean_data(tree):
285285
286286
"""
287287

288-
a = 22.897590714815188
289-
k = 1
290-
w = 0.22402192838740312
291-
292288
parser = argparse.ArgumentParser(prog="align_neoantigens_to_IEDB")
293289
parser.add_argument("--alignment", help="neoantigen alignment file", required=True)
294290
parser.add_argument("--input", help="patient_data file", required=True)
295-
291+
parser.add_argument("--a_param", help="weight corresponding to a", default = 22.897590714815188)
292+
parser.add_argument("--k_param", help="weight corresponding to k", default = 1)
293+
parser.add_argument("--w_param", help="weight corresponding to w", default = 0.22402192838740312)
294+
296295
args = parser.parse_args()
297296

298297
alignment_file = args.alignment
299298
patient_file = args.input
300299

300+
a = float(args.a_param)
301+
k = float(args.k_param)
302+
w = float(args.w_param)
303+
304+
301305
epidist = EpitopeDistance()
302306

303307
sample_file = patient_file

modules/msk/neoantigenediting/computefitness/tests/main.nf.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ nextflow_process {
33
name "Test Process NEOANTIGENEDITING_COMPUTEFITNESS"
44
script "../main.nf"
55
process "NEOANTIGENEDITING_COMPUTEFITNESS"
6+
config "./nextflow.config"
67

78
tag "modules"
89
tag "modules_nfcore"
@@ -20,6 +21,12 @@ nextflow_process {
2021
file(params.test_data_mskcc['neoantigen']['patient_data'], checkIfExists: true),
2122
file(params.test_data_mskcc['neoantigen']['iedb_alignments'], checkIfExists: true)
2223
]
24+
input[0] = [
25+
[ id:'test', single_end:false ], // meta map,
26+
file(params.test_data_mskcc['neoantigen']['patient_data'], checkIfExists: true),
27+
file(params.test_data_mskcc['neoantigen']['iedb_alignments'], checkIfExists: true)
28+
]
29+
2330

2431
"""
2532
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
params {
2+
enable_conda = false
3+
}
4+
5+
process {
6+
withName: 'NEOANTIGENEDITING_COMPUTEFITNESS' {
7+
ext.args = '--a_param 22.897590714815188 --k_param 1 --w_param 0.22402192838740312'
8+
}
9+
}

modules/msk/neoantigenutils/convertannotjson/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ process NEOANTIGENUTILS_CONVERTANNOTJSON {
22
tag "$meta.id"
33
label 'process_single'
44
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
5-
'docker://mskcc/neoantigen-utils-base:1.0.0':
6-
'docker.io/mskcc/neoantigen-utils-base:1.0.0' }"
5+
'docker://mskcc/neoantigen-utils-base:1.3.0':
6+
'docker.io/mskcc/neoantigen-utils-base:1.3.0' }"
77

88
input:
99
tuple val(meta), path(annotatedJSON)

modules/msk/neoantigenutils/convertannotjson/resources/usr/bin/convertannotjson.py

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,61 @@
33
import json
44
import argparse
55

6-
VERSION = 1.0
6+
VERSION = 1.1
77

8-
def process_json_file(json_file_path,output_file_path):
8+
9+
def process_json_file(json_file_path, output_file_path):
910
with open(json_file_path, "r") as json_file:
1011
data = json.load(json_file)
1112

1213
# Define the TSV header
13-
tsv_header = ["id", "mutation_id", "HLA_gene_id", "sequence", "WT_sequence", "mutated_position", "Kd", "KdWT", "R", "logC", "logA", "quality", "git_branch"]
14+
tsv_header = [
15+
"id",
16+
"mutation_id",
17+
"Gene",
18+
"HLA_gene_id",
19+
"sequence",
20+
"WT_sequence",
21+
"mutated_position",
22+
"Kd",
23+
"KdWT",
24+
"R",
25+
"logC",
26+
"logA",
27+
"quality",
28+
"NMD",
29+
"git_branch",
30+
]
1431

1532
# Convert JSON to TSV
1633
tsv_lines = []
1734
tsv_lines.append("\t".join(tsv_header))
1835

1936
for neoantigen in data["neoantigens"]:
20-
tsv_lines.append("\t".join(str(neoantigen.get(field, "")) for field in tsv_header[:-1]))
37+
tsv_lines.append(
38+
"\t".join(str(neoantigen.get(field, "")) for field in tsv_header[:-1])
39+
)
2140

2241
tsv_output = "\n".join(tsv_lines)
2342

2443
# Write the TSV output to a file
2544
with open(output_file_path, "w") as tsv_file:
2645
tsv_file.write(tsv_output)
2746

47+
2848
def main():
29-
parser = argparse.ArgumentParser(description="Process an annotated JSON file and output TSV format.")
49+
parser = argparse.ArgumentParser(
50+
description="Process an annotated JSON file and output TSV format."
51+
)
3052
parser.add_argument("--json_file", help="Path to the annotated JSON file")
3153
parser.add_argument("--output_file", help="Path to the output TSV file")
3254
parser.add_argument(
3355
"-v", "--version", action="version", version="v{}".format(VERSION)
3456
)
3557
args = parser.parse_args()
3658

37-
process_json_file(args.json_file,args.output_file)
59+
process_json_file(args.json_file, args.output_file)
60+
3861

3962
if __name__ == "__main__":
4063
main()

0 commit comments

Comments
 (0)