Skip to content

Commit 31ce615

Browse files
update to put all files in one place
1 parent e5ecc0c commit 31ce615

File tree

5 files changed

+32
-15
lines changed

5 files changed

+32
-15
lines changed

scripts/color_peptides51mer.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ def parse_arguments():
3030
help='The path to the classI all_epitopes.aggregated.tsv used in pVACseq', required=True)
3131
parser.add_argument('-classII',
3232
help='The path to the classII all_epitopes.aggregated.tsv used in pVACseq', required=True)
33+
parser.add_argument('-WB',
34+
help='the path to the gcp_immuno folder of the trial you wish to tun script on, defined as WORKING_BASE in envs.txt')
35+
parser.add_argument('-samp', help='Name of the sample')
3336

34-
parser.add_argument('-o', help="Output location", required=True)
3537

3638
return(parser.parse_args())
3739

@@ -344,10 +346,14 @@ def main():
344346
print("ClassI: ", classI_peptide)
345347
print("ClassII: ", classII_peptide, "\n")
346348

347-
with open(args.o, "w", encoding = 'utf-8') as file:
348-
file.write(modified_html)
349+
if args.WB:
350+
html_file_name = args.WB + '/../manual_review/' + args.samp + ".Colored_Peptides.html"
351+
else:
352+
html_file_name = args.samp + ".Colored_Peptides.html"
349353

354+
with open(html_file_name, "w", encoding = 'utf-8') as file:
355+
file.write(modified_html)
350356

351357

352358
if __name__ == "__main__":
353-
main()
359+
main() main()

scripts/generate_reviews_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mport argparse
1+
import argparse
22
import csv
33
import pandas as pd
44
import sys

scripts/get_FDA_thresholds.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,12 @@ def main():
349349

350350

351351

352-
353-
fda_quality_thresholds = pd.read_csv("/opt/scripts/fda_quality_thresholds.csv")
352+
try:
353+
fda_quality_thresholds = pd.read_csv("/opt/scripts/fda_quality_thresholds.csv")
354+
except:
355+
print("Running Locally, not in Docker")
356+
fda_quality_thresholds = pd.read_csv("scripts/fda_quality_thresholds.csv")
357+
print()
354358

355359
qc = reshape_quality_thresholds(fda_quality_thresholds)
356360

@@ -362,7 +366,7 @@ def main():
362366

363367

364368
if args.WB:
365-
qc.to_csv(args.WB + final_result + '/fda_quality_thresholds_report.tsv', sep="\t", index=False)
369+
qc.to_csv(args.WB + '/../manual_review/fda_quality_thresholds_report.tsv', sep="\t", index=False)
366370
else:
367371
qc.to_csv('fda_quality_thresholds_report.tsv', sep="\t", index=False)
368372

@@ -374,3 +378,4 @@ def main():
374378
if __name__ == "__main__":
375379
main()
376380

381+

scripts/get_neoantigen_qc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def main():
270270

271271
# create a text file to store results
272272
if args.WB:
273-
qc_file = open(args.WB + final_result + '/qc_file.txt', 'w')
273+
qc_file = open(args.WB + '/../manual_review/qc_file.txt', 'w')
274274
else:
275275
qc_file = open('qc_file.txt', 'w')
276276

@@ -291,4 +291,4 @@ def main():
291291

292292

293293
if __name__ == "__main__":
294-
main()
294+
main()

scripts/setup_review.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,41 @@
44
# Define the command-line arguments
55
parser = argparse.ArgumentParser(description='Sets up manuel review files')
66

7+
parser.add_argument('-WB',
8+
help='the path to the gcp_immuno folder of the trial you wish to tun script on, defined as WORKING_BASE in envs.txt')
9+
710
parser.add_argument('-samp', help='Name of the sample')
811
parser.add_argument('-a', help='Path to ITB Reviewed Candidates')
912
parser.add_argument('-c', help='Path to annotated_filtered.vcf-pass-51mer.fa.manufacturability.tsv')
1013

1114
parser.add_argument('-classI', help='Path to classI all_epitopes.aggregated.tsv', required=True)
1215
parser.add_argument('-classII', help='Path to classII all_epitopes.aggregated.tsv', required=True)
13-
parser.add_argument('-o', help='The name of the html in which the coloring will be printed', required=True)
1416

1517

1618

1719
# Parse the command-line arguments
1820
args = parser.parse_args()
1921

2022
# Check if the required arguments are provided
21-
if not args.classI or not args.classII or not args.o:
22-
parser.error("Missing required arguments. Please provide -p, -classI, -classII, and -o.")
23+
if not args.classI or not args.classII or not args.WB:
24+
parser.error("Missing required arguments. Please provide -p, -classI, -classII, and -WB.")
2325

2426

2527

26-
command1 = f"python /opt/scripts/generate_reviews_files.py -a {args.a} -c {args.c} -samp {args.samp}"
27-
command2 = f"python /opt/scripts/color_peptides51mer.py -p {args.samp}_Peptides_51-mer.xlsx -classI {args.classI} -classII {args.classII} -o {args.o}"
28+
command1 = f"python /opt/scripts/generate_reviews_files.py -WB {args.WB} -a {args.a} -c {args.c} -samp {args.samp}"
29+
command2 = f"python /opt/scripts/color_peptides51mer.py -WB {args.WB} -p {args.WB}/../manual_review/{args.samp}_Peptides_51-mer.xlsx -classI {args.classI} -classII {args.classII} -samp {args.samp}"
2830

2931

3032
# Execute the first script
3133
print("Generating Review Files...")
34+
3235
subprocess.run(command1, shell=True)
3336

3437
# Execute the second script
3538
print("Coloring Peptide Sequeces...")
39+
3640
subprocess.run(command2, shell=True)
3741

42+
3843
print("Scripts have been executed successfully.")
44+

0 commit comments

Comments
 (0)