Skip to content

Commit b86de9b

Browse files
Fix main pVACview table header tooltips
1 parent 5b43da5 commit b86de9b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pvactools/tools/pvacview/styling.R

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,25 @@ rowcallback <- function(hla_count, row_num) {
1010
}
1111

1212
callback <- function(hla_count, score_mode) {
13+
print("HLA count")
14+
print(hla_count)
1315
c(
1416
"var tips = ['Gene - The Ensembl gene name of the affected gene.',",
1517
" 'AA Change - The amino acid change for the mutation. Note that FS indicates a frameshift variant.',",
1618
" 'Num Passing Transcripts - The number of transcripts for this mutation that resulted in at least one well-binding peptide.',",
1719
" 'Best Peptide - The best-binding mutant epitope sequence (lowest mutant binding affinity) prioritizing epitope sequences that resulted from a protein_coding transcript with a TSL below the maximum transcript support level and having no problematic positions.',",
1820
" 'Best Transcript - Transcript corresponding to the best peptide with the lowest TSL and shortest length.',",
19-
" 'TSL - Transcript support level of the best peptide.',",
21+
" 'MANE Select - MANE select status of the best transcript.',",
22+
" 'Canonical - Canonical status of the best transcript.',",
23+
" 'TSL - Transcript support level of the best transcript.',",
2024
" 'Allele',",
2125
" 'Pos - The one-based position of the start of the mutation within the epitope sequence. 0 if the start of the mutation is before the epitope (as can occur downstream of frameshift mutations).',",
2226
" 'Prob Pos - Problematic positions within the best peptide.',",
2327
" 'Num Included Peptides - The number of top-scoring, unique peptides included for review.',",
2428
" 'Num Passing Peptides - The number of unique well-binding peptides for this mutation.',",
25-
gsub("X", score_mode," 'IC50 MT - X IC50 binding affinity of the best-binding mutant epitope across all prediction algorithms used.', "),
29+
paste(" 'IC50 MT -", score_mode, "IC50 binding affinity of the best-binding mutant epitope across all prediction algorithms used.', "),
2630
" 'IC50 WT - IC50 binding affinity of the corresponding wildtype epitope.',",
27-
gsub("X", score_mode," '%ile MT - X binding affinity percentile rank of the best-binding mutant epitope across all prediction algorithms used (those that provide percentile output).', "),
31+
paste(" '%ile MT - ", score_mode, "binding affinity percentile rank of the best-binding mutant epitope across all prediction algorithms used (those that provide percentile output).', "),
2832
" '%ile WT - Binding affinity percentile rank of the corresponding wildtype epitope across all prediction algorithms used (those that provide percentile output).', ",
2933
" 'RNA Expr - Gene expression value for the annotated gene containing the variant.',",
3034
" 'RNA VAF - Tumor RNA variant allele frequency (VAF) at this position.',",
@@ -37,8 +41,8 @@ callback <- function(hla_count, score_mode) {
3741
" 'Rej - Click the thumbs-down button to reject a neoantigen candidate.',",
3842
" 'Rev - Click the flag button to mark a neoantigen candidate for review.'],",
3943
"header = table.columns().header();",
40-
gsub("7", hla_count, "for (var i = 7; i-7 < tips.length; i++) {"),
41-
gsub("7", hla_count, "$(header[i]).attr('title', tips[i-7]);"),
44+
paste("for (var i = ", hla_count+1, "; i-", hla_count+1, " < tips.length; i++) {"),
45+
paste("$(header[i]).attr('title', tips[i-", hla_count+1, "]);"),
4246
"}"
4347
)
4448
}

0 commit comments

Comments
 (0)