Skip to content

Commit 927fd52

Browse files
Merge remote-tracking branch 'origin/hotfix'
2 parents f3df76d + 07f57b2 commit 927fd52

File tree

12 files changed

+228
-8
lines changed

12 files changed

+228
-8
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
sudo apt-get install -y ghostscript
6868
sudo apt-get install -y gcc
6969
sudo apt-get install -y pandoc
70+
pip install setuptools==57
7071
- name: Install Python dependencies
7172
run: |
7273
pip install -r requirements.txt

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
# The short X.Y version.
7070
version = '3.1'
7171
# The full version, including alpha/beta/rc tags.
72-
release = '3.1.2'
72+
release = '3.1.3'
7373

7474

7575
# The language for content autogenerated by Sphinx. Refer to documentation

docs/index.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ New in Release |release|
5656

5757
This is a bugfix release. It fixes the following problem(s):
5858

59-
- It fixes an issue with parsing class II IEDB output files when running
60-
pVACfuse or pVACbind, which resulted in the wrong binding prediction scores
61-
being associated with certain epitopes.
62-
- It adds missing import statements to pVACvector.
59+
- It fixes an issue with the reference proteome match step where stop lost
60+
mutations would throw a fatal error.
6361

6462
New in Version |version|
6563
------------------------

docs/releases/3_1.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ This is a bugfix release. It fixes the following problem(s):
4545
pVACfuse or pVACbind, which resulted in the wrong binding prediction scores
4646
being associated with certain epitopes.
4747
- It adds missing import statements to pVACvector.
48+
49+
Version 3.1.3
50+
-------------
51+
52+
This is a bugfix release. It fixes the following problem(s):
53+
54+
- It fixes an issue with the reference proteome match step where stop lost
55+
mutations would throw a fatal error.

pvactools/lib/calculate_reference_proteome_similarity.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,14 @@ def extract_n_mer_from_fs(self, full_peptide, wt_peptide, epitope, subpeptide_po
201201
#This catches cases where the start position would cause too many leading wildtype amino acids, which would result
202202
#in false-positive reference matches
203203
if len(full_peptide) > len(wt_peptide):
204-
diff_position = [i for i in range(len(wt_peptide)) if wt_peptide[i] != full_peptide[i]][0]
204+
diffs = [i for i in range(len(wt_peptide)) if wt_peptide[i] != full_peptide[i]]
205+
if diffs == []:
206+
diffs = [len(wt_peptide)]
205207
else:
206-
diff_position = [i for i in range(len(full_peptide)) if wt_peptide[i] != full_peptide[i]][0]
208+
diffs = [i for i in range(len(full_peptide)) if wt_peptide[i] != full_peptide[i]]
209+
if diffs == []:
210+
diffs = [len(full_peptide)]
211+
diff_position = diffs[0]
207212
min_start = diff_position - self.match_length + 1
208213
if min_start > start:
209214
start = min_start

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
setup(
4646
name="pvactools",
47-
version="3.1.2",
47+
version="3.1.3",
4848
packages=[
4949
"pvactools.tools",
5050
"pvactools.tools.pvacbind",

tests/test_calculate_reference_proteome_similarity.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,24 @@ def test_calculate_self_similarity(self):
3939
os.remove(metric_file)
4040
close_mock_fhs()
4141

42+
def test_wt_peptide_fully_in_mt_peptide(self):
43+
with unittest.mock.patch('Bio.Blast.NCBIWWW.qblast', side_effect=mock_ncbiwww_qblast):
44+
input_file = os.path.join(self.test_data_dir, 'input_wt_in_mt.tsv')
45+
input_fasta = os.path.join(self.test_data_dir, 'input_wt_in_mt.fasta')
46+
output_file = tempfile.NamedTemporaryFile()
47+
metric_file = "{}.reference_matches".format(output_file.name)
48+
self.assertFalse(CalculateReferenceProteomeSimilarity(input_file, input_fasta, output_file.name).execute())
49+
self.assertTrue(cmp(
50+
output_file.name,
51+
os.path.join(self.test_data_dir, "output_wt_in_mt.tsv"),
52+
))
53+
self.assertTrue(cmp(
54+
metric_file,
55+
os.path.join(self.test_data_dir, "output_wt_in_mt.tsv.reference_matches"),
56+
))
57+
os.remove(metric_file)
58+
close_mock_fhs()
59+
4260
def test_blastp_db_incompatible_with_species(self):
4361
with self.assertRaises(Exception) as context:
4462
input_file = os.path.join(self.test_data_dir, 'input.tsv')
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">
3+
<BlastOutput>
4+
<BlastOutput_program>blastp</BlastOutput_program>
5+
<BlastOutput_version>BLASTP 2.14.1+</BlastOutput_version>
6+
<BlastOutput_reference>Stephen F. Altschul, Thomas L. Madden, Alejandro A. Sch&amp;auml;ffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), &quot;Gapped BLAST and PSI-BLAST: a new generation of protein database search programs&quot;, Nucleic Acids Res. 25:3389-3402.</BlastOutput_reference>
7+
<BlastOutput_db>refseq_select_prot</BlastOutput_db>
8+
<BlastOutput_query-ID>Query_62973</BlastOutput_query-ID>
9+
<BlastOutput_query-def>unnamed protein product</BlastOutput_query-def>
10+
<BlastOutput_query-len>30</BlastOutput_query-len>
11+
<BlastOutput_param>
12+
<Parameters>
13+
<Parameters_matrix>BLOSUM62</Parameters_matrix>
14+
<Parameters_expect>10</Parameters_expect>
15+
<Parameters_gap-open>32767</Parameters_gap-open>
16+
<Parameters_gap-extend>32767</Parameters_gap-extend>
17+
<Parameters_filter>F</Parameters_filter>
18+
</Parameters>
19+
</BlastOutput_param>
20+
<BlastOutput_iterations>
21+
<Iteration>
22+
<Iteration_iter-num>1</Iteration_iter-num>
23+
<Iteration_query-ID>Query_62973</Iteration_query-ID>
24+
<Iteration_query-def>unnamed protein product</Iteration_query-def>
25+
<Iteration_query-len>30</Iteration_query-len>
26+
<Iteration_hits>
27+
<Hit>
28+
<Hit_num>1</Hit_num>
29+
<Hit_id>ref|NP_258260.1|</Hit_id>
30+
<Hit_def>F-BAR and double SH3 domains protein 1 [Homo sapiens]</Hit_def>
31+
<Hit_accession>NP_258260</Hit_accession>
32+
<Hit_len>690</Hit_len>
33+
<Hit_hsps>
34+
<Hsp>
35+
<Hsp_num>1</Hsp_num>
36+
<Hsp_bit-score>23.9769</Hsp_bit-score>
37+
<Hsp_score>46</Hsp_score>
38+
<Hsp_evalue>2.06221</Hsp_evalue>
39+
<Hsp_query-from>15</Hsp_query-from>
40+
<Hsp_query-to>27</Hsp_query-to>
41+
<Hsp_hit-from>286</Hsp_hit-from>
42+
<Hsp_hit-to>298</Hsp_hit-to>
43+
<Hsp_query-frame>0</Hsp_query-frame>
44+
<Hsp_hit-frame>0</Hsp_hit-frame>
45+
<Hsp_identity>7</Hsp_identity>
46+
<Hsp_positive>10</Hsp_positive>
47+
<Hsp_gaps>0</Hsp_gaps>
48+
<Hsp_align-len>13</Hsp_align-len>
49+
<Hsp_qseq>FLKPPALISPSPP</Hsp_qseq>
50+
<Hsp_hseq>FLQEPGVFSPTPP</Hsp_hseq>
51+
<Hsp_midline>FL+ P + SP+PP</Hsp_midline>
52+
</Hsp>
53+
</Hit_hsps>
54+
</Hit>
55+
<Hit>
56+
<Hit_num>2</Hit_num>
57+
<Hit_id>ref|NP_001277116.1|</Hit_id>
58+
<Hit_def>protein KRBA1 isoform 2 [Homo sapiens]</Hit_def>
59+
<Hit_accession>NP_001277116</Hit_accession>
60+
<Hit_len>1064</Hit_len>
61+
<Hit_hsps>
62+
<Hsp>
63+
<Hsp_num>1</Hsp_num>
64+
<Hsp_bit-score>23.5187</Hsp_bit-score>
65+
<Hsp_score>45</Hsp_score>
66+
<Hsp_evalue>3.98271</Hsp_evalue>
67+
<Hsp_query-from>1</Hsp_query-from>
68+
<Hsp_query-to>26</Hsp_query-to>
69+
<Hsp_hit-from>695</Hsp_hit-from>
70+
<Hsp_hit-to>720</Hsp_hit-to>
71+
<Hsp_query-frame>0</Hsp_query-frame>
72+
<Hsp_hit-frame>0</Hsp_hit-frame>
73+
<Hsp_identity>11</Hsp_identity>
74+
<Hsp_positive>15</Hsp_positive>
75+
<Hsp_gaps>0</Hsp_gaps>
76+
<Hsp_align-len>26</Hsp_align-len>
77+
<Hsp_qseq>DVTKPVPHLRLLIAFLKPPALISPSP</Hsp_qseq>
78+
<Hsp_hseq>DLWKPLPQERDRLPSCKPPVPLSPCP</Hsp_hseq>
79+
<Hsp_midline>D+ KP+P R + KPP +SP P</Hsp_midline>
80+
</Hsp>
81+
</Hit_hsps>
82+
</Hit>
83+
<Hit>
84+
<Hit_num>3</Hit_num>
85+
<Hit_id>ref|NP_055858.2|</Hit_id>
86+
<Hit_def>TBC1 domain family member 9B isoform b [Homo sapiens]</Hit_def>
87+
<Hit_accession>NP_055858</Hit_accession>
88+
<Hit_len>1233</Hit_len>
89+
<Hit_hsps>
90+
<Hsp>
91+
<Hsp_num>1</Hsp_num>
92+
<Hsp_bit-score>23.0605</Hsp_bit-score>
93+
<Hsp_score>44</Hsp_score>
94+
<Hsp_evalue>4.03719</Hsp_evalue>
95+
<Hsp_query-from>2</Hsp_query-from>
96+
<Hsp_query-to>19</Hsp_query-to>
97+
<Hsp_hit-from>740</Hsp_hit-from>
98+
<Hsp_hit-to>757</Hsp_hit-to>
99+
<Hsp_query-frame>0</Hsp_query-frame>
100+
<Hsp_hit-frame>0</Hsp_hit-frame>
101+
<Hsp_identity>8</Hsp_identity>
102+
<Hsp_positive>12</Hsp_positive>
103+
<Hsp_gaps>0</Hsp_gaps>
104+
<Hsp_align-len>18</Hsp_align-len>
105+
<Hsp_qseq>VTKPVPHLRLLIAFLKPP</Hsp_qseq>
106+
<Hsp_hseq>VSPPIPHLRALLSSSDDP</Hsp_hseq>
107+
<Hsp_midline>V+ P+PHLR L++ P</Hsp_midline>
108+
</Hsp>
109+
</Hit_hsps>
110+
</Hit>
111+
<Hit>
112+
<Hit_num>4</Hit_num>
113+
<Hit_id>ref|NP_112235.2|</Hit_id>
114+
<Hit_def>mediator of RNA polymerase II transcription subunit 25 isoform 1 [Homo sapiens]</Hit_def>
115+
<Hit_accession>NP_112235</Hit_accession>
116+
<Hit_len>747</Hit_len>
117+
<Hit_hsps>
118+
<Hsp>
119+
<Hsp_num>1</Hsp_num>
120+
<Hsp_bit-score>22.6023</Hsp_bit-score>
121+
<Hsp_score>43</Hsp_score>
122+
<Hsp_evalue>6.13634</Hsp_evalue>
123+
<Hsp_query-from>4</Hsp_query-from>
124+
<Hsp_query-to>27</Hsp_query-to>
125+
<Hsp_hit-from>186</Hsp_hit-from>
126+
<Hsp_hit-to>209</Hsp_hit-to>
127+
<Hsp_query-frame>0</Hsp_query-frame>
128+
<Hsp_hit-frame>0</Hsp_hit-frame>
129+
<Hsp_identity>11</Hsp_identity>
130+
<Hsp_positive>14</Hsp_positive>
131+
<Hsp_gaps>0</Hsp_gaps>
132+
<Hsp_align-len>24</Hsp_align-len>
133+
<Hsp_qseq>KPVPHLRLLIAFLKPPALISPSPP</Hsp_qseq>
134+
<Hsp_hseq>RKLPALRLLFEKAAPPALLEPLQP</Hsp_hseq>
135+
<Hsp_midline>+ +P LRLL PPAL+ P P</Hsp_midline>
136+
</Hsp>
137+
</Hit_hsps>
138+
</Hit>
139+
<Hit>
140+
<Hit_num>5</Hit_num>
141+
<Hit_id>ref|NP_055977.3|</Hit_id>
142+
<Hit_def>long-chain-fatty-acid--CoA ligase ACSBG1 isoform 1 [Homo sapiens]</Hit_def>
143+
<Hit_accession>NP_055977</Hit_accession>
144+
<Hit_len>724</Hit_len>
145+
<Hit_hsps>
146+
<Hsp>
147+
<Hsp_num>1</Hsp_num>
148+
<Hsp_bit-score>22.6023</Hsp_bit-score>
149+
<Hsp_score>43</Hsp_score>
150+
<Hsp_evalue>6.58373</Hsp_evalue>
151+
<Hsp_query-from>2</Hsp_query-from>
152+
<Hsp_query-to>19</Hsp_query-to>
153+
<Hsp_hit-from>222</Hsp_hit-from>
154+
<Hsp_hit-to>239</Hsp_hit-to>
155+
<Hsp_query-frame>0</Hsp_query-frame>
156+
<Hsp_hit-frame>0</Hsp_hit-frame>
157+
<Hsp_identity>6</Hsp_identity>
158+
<Hsp_positive>13</Hsp_positive>
159+
<Hsp_gaps>0</Hsp_gaps>
160+
<Hsp_align-len>18</Hsp_align-len>
161+
<Hsp_qseq>VTKPVPHLRLLIAFLKPP</Hsp_qseq>
162+
<Hsp_hseq>IWKQLPHLKAVVIYKEPP</Hsp_hseq>
163+
<Hsp_midline>+ K +PHL+ ++ + +PP</Hsp_midline>
164+
</Hsp>
165+
</Hit_hsps>
166+
</Hit>
167+
</Iteration_hits>
168+
<Iteration_stat>
169+
<Statistics>
170+
<Statistics_db-num>19390</Statistics_db-num>
171+
<Statistics_db-len>11240616</Statistics_db-len>
172+
<Statistics_hsp-len>0</Statistics_hsp-len>
173+
<Statistics_eff-space>0</Statistics_eff-space>
174+
<Statistics_kappa>0.134</Statistics_kappa>
175+
<Statistics_lambda>0.3176</Statistics_lambda>
176+
<Statistics_entropy>0.4012</Statistics_entropy>
177+
</Statistics>
178+
</Iteration_stat>
179+
</Iteration>
180+
</BlastOutput_iterations>
181+
</BlastOutput>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
>WT.1.CDK2.ENST00000266970.FS.298-299C/CT
2+
DVTKPVPHLRL
3+
>MT.1.CDK2.ENST00000266970.FS.298-299C/CT
4+
DVTKPVPHLRLLIAFLKPPALISPSPPVWA
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Chromosome Start Stop Reference Variant Transcript Transcript Support Level Ensembl Gene ID Variant Type Mutation Protein Position Gene Name HGVSc HGVSp HLA Allele Peptide Length Sub-peptide Position Mutation Position MT Epitope Seq WT Epitope Seq Best MT Score Method Best MT Score Corresponding WT Score Corresponding Fold Change Best MT Percentile Method Best MT Percentile Corresponding WT Percentile Tumor DNA Depth Tumor DNA VAF Tumor RNA Depth Tumor RNA VAF Normal Depth Normal VAF Gene Expression Transcript Expression Median MT Score Median WT Score Median Fold Change Median MT Percentile Median WT Percentile MHCflurry WT Score MHCflurry MT Score MHCflurry WT Percentile MHCflurry MT Percentile MHCnuggetsI WT Score MHCnuggetsI MT Score MHCnuggetsI WT Percentile MHCnuggetsI MT Percentile NetMHC WT Score NetMHC MT Score NetMHC WT Percentile NetMHC MT Percentile NetMHCcons WT Score NetMHCcons MT Score NetMHCcons WT Percentile NetMHCcons MT Percentile NetMHCpan WT Score NetMHCpan MT Score NetMHCpan WT Percentile NetMHCpan MT Percentile PickPocket WT Score PickPocket MT Score PickPocket WT Percentile PickPocket MT Percentile SMM WT Score SMM MT Score SMM WT Percentile SMM MT Percentile SMMPMBEC WT Score SMMPMBEC MT Score SMMPMBEC WT Percentile SMMPMBEC MT Percentile Index cterm_7mer_gravy_score max_7mer_gravy_score difficult_n_terminal_residue c_terminal_cysteine c_terminal_proline cysteine_count n_terminal_asparagine asparagine_proline_bond_count
2+
chr12 55971622 55971622 C CT ENST00000266970 1 ENSG00000123374 FS -/X 298-299 CDK2 ENST00000266970.9:c.895dup ENSP00000266970.4:p.Ter299LeufsTer20 HLA-C*12:03 9 11 NA IAFLKPPAL NA NetMHCpan 14.32 NA NA MHCflurry 0.003 NA 268 0.267 NA NA 136 0.008 NA NA 47.332 NA NA 0.5 NA NA 28.543855693594235 NA 0.002625 NA 333.37 NA NA NA 364.63 NA 0.44 NA 64.78 NA 1.1 NA 14.32 NA 0.04 NA 1073.583066484683 NA 0.5 NA 16.077184658902514 NA 19.0 NA 29.883399446491428 NA 43.0 1.CDK2.ENST00000266970.FS.298-299C/CT 0.7285714285714285 0.8285714285714284 False False False 0 False 0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Chromosome Start Stop Reference Variant Transcript Transcript Support Level Ensembl Gene ID Variant Type Mutation Protein Position Gene Name HGVSc HGVSp HLA Allele Peptide Length Sub-peptide Position Mutation Position MT Epitope Seq WT Epitope Seq Best MT Score Method Best MT Score Corresponding WT Score Corresponding Fold Change Best MT Percentile Method Best MT Percentile Corresponding WT Percentile Tumor DNA Depth Tumor DNA VAF Tumor RNA Depth Tumor RNA VAF Normal Depth Normal VAF Gene Expression Transcript Expression Median MT Score Median WT Score Median Fold Change Median MT Percentile Median WT Percentile MHCflurry WT Score MHCflurry MT Score MHCflurry WT Percentile MHCflurry MT Percentile MHCnuggetsI WT Score MHCnuggetsI MT Score MHCnuggetsI WT Percentile MHCnuggetsI MT Percentile NetMHC WT Score NetMHC MT Score NetMHC WT Percentile NetMHC MT Percentile NetMHCcons WT Score NetMHCcons MT Score NetMHCcons WT Percentile NetMHCcons MT Percentile NetMHCpan WT Score NetMHCpan MT Score NetMHCpan WT Percentile NetMHCpan MT Percentile PickPocket WT Score PickPocket MT Score PickPocket WT Percentile PickPocket MT Percentile SMM WT Score SMM MT Score SMM WT Percentile SMM MT Percentile SMMPMBEC WT Score SMMPMBEC MT Score SMMPMBEC WT Percentile SMMPMBEC MT Percentile Index cterm_7mer_gravy_score max_7mer_gravy_score difficult_n_terminal_residue c_terminal_cysteine c_terminal_proline cysteine_count n_terminal_asparagine asparagine_proline_bond_count Reference Match
2+
chr12 55971622 55971622 C CT ENST00000266970 1 ENSG00000123374 FS -/X 298-299 CDK2 ENST00000266970.9:c.895dup ENSP00000266970.4:p.Ter299LeufsTer20 HLA-C*12:03 9 11 NA IAFLKPPAL NA NetMHCpan 14.32 NA NA MHCflurry 0.003 NA 268 0.267 NA NA 136 0.008 NA NA 47.332 NA NA 0.5 NA NA 28.543855693594235 NA 0.002625 NA 333.37 NA NA NA 364.63 NA 0.44 NA 64.78 NA 1.1 NA 14.32 NA 0.04 NA 1073.583066484683 NA 0.5 NA 16.077184658902514 NA 19.0 NA 29.883399446491428 NA 43.0 1.CDK2.ENST00000266970.FS.298-299C/CT 0.7285714285714285 0.8285714285714284 False False False 0 False 0 False
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Chromosome Start Stop Reference Variant Transcript MT Epitope Seq Peptide Hit ID Hit Definition Query Sequence Query Window Match Sequence Match Start Match Stop

0 commit comments

Comments
 (0)