Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mhc_rank
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Skillman-Lawrence
mhc_rank
Commits
2991a93a
Commit
2991a93a
authored
5 years ago
by
Tim O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
b7311355
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
downloads-generation/data_mass_spec_benchmark/run_predictors.py
+25
-2
25 additions, 2 deletions
...ads-generation/data_mass_spec_benchmark/run_predictors.py
with
25 additions
and
2 deletions
downloads-generation/data_mass_spec_benchmark/run_predictors.py
+
25
−
2
View file @
2991a93a
...
...
@@ -394,8 +394,31 @@ def do_predictions_mhctools(work_item_dicts, constant_data=None):
program_name
=
"
netMHCpan-4.0
"
,
mode
=
"
elution_score
"
)
elif
predictor_name
==
"
mixmhcpred
"
:
predictor
=
mhctools
.
MixMHCpred
(
alleles
=
alleles
)
# Empirically determine supported alleles.
mixmhcpred_usable_alleles
=
[]
unusable_alleles
=
[]
for
allele
in
alleles
:
predictor
=
mhctools
.
MixMHCpred
(
alleles
=
[
allele
])
# We use inf not nan to indicate unsupported alleles since
# we use nan to indicate incomplete results that still need
# to execute.
empty_results
=
pandas
.
Series
(
index
=
peptides
,
dtype
=
numpy
.
float16
)
empty_results
[:]
=
numpy
.
inf
try
:
predictor
.
predict_peptides_dataframe
([
"
PEPTIDESS
"
])
mixmhcpred_usable_alleles
.
append
(
allele
)
except
ValueError
:
unusable_alleles
.
append
(
allele
)
for
col
in
cols
:
result
[
"
%s %s
"
%
(
allele
,
col
)]
=
empty_results
.
values
print
(
"
MixMHCpred usable alleles:
"
,
*
mixmhcpred_usable_alleles
)
print
(
"
MixMHCpred unusable alleles:
"
,
*
unusable_alleles
)
predictor
=
mhctools
.
MixMHCpred
(
alleles
=
alleles
)
assert
mixmhcpred_usable_alleles
,
mixmhcpred_usable_alleles
alleles
=
mixmhcpred_usable_alleles
else
:
raise
ValueError
(
"
Unsupported
"
,
predictor_name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment