Skip to content

Commit 0f03dde

Browse files
updates
1 parent 3b52833 commit 0f03dde

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ADD scripts/fda_quality_thresholds.csv /opt/scripts/fda_quality_thresholds.csv
99
ADD scripts/generate_reviews_files.py /opt/scripts/generate_reviews_files.py
1010
ADD scripts/bold_classII.py /opt/scripts/bold_classII.py
1111
ADD scripts/color_peptides51mer.py /opt/scripts/color_peptides51mer.py
12-
ADD scripts/setup_reivew.py /opt/scripts/setup_review.py
12+
ADD scripts/setup_review.py /opt/scripts/setup_review.py
1313

1414
RUN chmod +r /opt/scripts/*
1515

scripts/color_peptides51mer.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def set_underline(peptide_sequence, mutant_peptide_pos, row_ID):
115115
frameshift = False
116116
classI_position = 0
117117

118-
print(row_ID)
119118
if '-' in mutant_peptide_pos:
120119
positions = mutant_peptide_pos.split("-")
121120
start_position = int(positions[0])
@@ -251,12 +250,12 @@ def main():
251250
# Create a universal ID by editing the peptide 51mer ID
252251
peptides_51mer.rename(columns={'ID': 'full ID'}, inplace=True)
253252
peptides_51mer['ID'] = peptides_51mer['full ID']
254-
print()
255253

256254
peptides_51mer['ID'] = peptides_51mer['ID'].apply(lambda x: '.'.join(x.split('.')[1:])) # Removing before first period, periods will be removed
257255

258256
peptides_51mer['ID'] = peptides_51mer['ID'].apply(lambda x: '.'.join(x.split('.')[1:])) # Removing before second period
259257
peptides_51mer['ID'] = peptides_51mer['ID'].apply(lambda x: '.'.join(x.split('.')[:3]) + '.' + '.'.join(x.split('.')[4:]))
258+
260259

261260
for index, row in peptides_51mer.iterrows():
262261
for i, char in enumerate(row['ID'][::-1]):
@@ -306,7 +305,9 @@ def main():
306305
classII_peptide = merged_peptide_51mer.loc[merged_peptide_51mer['full ID'] == search_string, 'Best Peptide Class II'].values[0]
307306
#classI_sequence
308307
classI_peptide = merged_peptide_51mer.loc[merged_peptide_51mer['full ID'] == search_string, 'Best Peptide Class I'].values[0]
309-
# mutant pepetide position --- not working yet becasue of STUPID frameshift
308+
309+
310+
# mutant pepetide position ---
310311
mutant_peptide_pos = str(merged_peptide_51mer.loc[merged_peptide_51mer['full ID'] == search_string, 'Pos'].values[0])
311312

312313
# Find the tag containing the search string
@@ -326,9 +327,7 @@ def main():
326327

327328
# actaully lets break class I and classII into two steps and handle the mutated nucleotide in class I function
328329
# it should be basically like at that position in the class I set
329-
330-
print(row['full ID'])
331-
print(mutant_peptide_pos)
330+
332331
set_underline(peptide_sequence, mutant_peptide_pos, row['full ID'])
333332

334333
set_span_tags(peptide_sequence) # pass by reference
@@ -340,7 +339,10 @@ def main():
340339
modified_html = peptides_51mer_soup.prettify(formatter=None)
341340

342341
else:
343-
print("\nSearch string: ", search_string, " not found.\n")
342+
print("\nNOT FOUND: ", search_string)
343+
print("Mutant Peptide Position: ", mutant_peptide_pos)
344+
print("ClassI: ", classI_peptide)
345+
print("ClassII: ", classII_peptide, "\n")
344346

345347
with open(args.o, "w", encoding = 'utf-8') as file:
346348
file.write(modified_html)

scripts/get_FDA_thresholds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def parse_arguments():
3636
parser.add_argument("--una_n_dna", help="file path for unaligned normal dna FDA report table")
3737
parser.add_argument("--una_t_dna", help="file path for unaligned tumor dna FDA report table")
3838
parser.add_argument("--una_t_rna", help="file path for unaligned tumor rna FDA report table")
39-
parser.add_argument("--somalier", help="file path for Somalier results for sample tumor/normal sample relatedness")
39+
parser.add_argument("--somalier", help="file path for Somalier results for sample tumor/normal sample relatedness (concordance.somalier.pairs.tsv)")
4040
parser.add_argument("--contam_n", help="file path for VerifyBamID results for contamination the normal sample")
41-
parser.add_argument("--contam_t", help="file path for VerifyBamID results for contamination the tumor sample")
41+
parser.add_argument("--contam_t", help="file path for VerifyBamID results for contamination the tumor dna sample")
4242

4343
return(parser.parse_args())
4444

@@ -362,7 +362,7 @@ def main():
362362

363363

364364
if args.WB:
365-
qc.to_csv(args.WB + final_result + '/qc/fda_quality_thresholds_report.tsv', sep="\t", index=False)
365+
qc.to_csv(args.WB + final_result + '/fda_quality_thresholds_report.tsv', sep="\t", index=False)
366366
else:
367367
qc.to_csv('fda_quality_thresholds_report.tsv', sep="\t", index=False)
368368

scripts/get_neoantigen_qc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,16 @@ def main():
274274
else:
275275
qc_file = open('qc_file.txt', 'w')
276276

277-
277+
print()
278+
print()
279+
278280
qc_file.write(get_read_pairs(normal_dna, tumor_dna, tumor_rna))
279281
qc_file.write(get_relatedness(concordance))
280282
qc_file.write(get_contaimination(contamination_normal, contamination_tumor))
281283
qc_file.write(get_rna_alignment(rna_metrics))
282284
qc_file.write(check_strand(strandness_check, yaml_file))
283285
qc_file.write(get_variant_count(final_variants))
286+
qc_file.write("REMEMBER to visually inspect end bias plot (usually found in qc/tumor_rna/rna_metrics.pdf)")
284287

285288
print()
286289
print("REMEMBER to visually inspect end bias plot (usually found in qc/tumor_rna/rna_metrics.pdf)")

scripts/setup_review.py

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

7+
parser.add_argument('-samp', help='Name of the sample')
78
parser.add_argument('-a', help='Path to ITB Reviewed Candidates')
89
parser.add_argument('-c', help='Path to annotated_filtered.vcf-pass-51mer.fa.manufacturability.tsv')
9-
parser.add_argument('-samp', help='Name of the sample')
10-
parser.add_argument('-f', "--fin_results", help='Name of the final results folder')
1110

1211
parser.add_argument('-classI', help='Path to classI all_epitopes.aggregated.tsv', required=True)
1312
parser.add_argument('-classII', help='Path to classII all_epitopes.aggregated.tsv', required=True)
@@ -24,8 +23,8 @@
2423

2524

2625

27-
command1 = f"python scripts/generate_reviews_files.py -a {args.a} -c {args.c} -samp {args.samp}"
28-
command2 = f"python scripts/color_peptides51mer.py -p {args.samp}_Peptides_51-mer.xlsx -classI {args.classI} -classII {args.classII} -o {args.o}"
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}"
2928

3029

3130
# Execute the first script

0 commit comments

Comments
 (0)