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
fb4bb8a2
Commit
fb4bb8a2
authored
5 years ago
by
Tim O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
Add mixmhcpred to mass spec benchmark
parent
3136d2f1
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
downloads-generation/data_mass_spec_benchmark/GENERATE.sh
+27
-20
27 additions, 20 deletions
downloads-generation/data_mass_spec_benchmark/GENERATE.sh
downloads-generation/data_mass_spec_benchmark/run_predictors.py
+7
-1
7 additions, 1 deletion
...ads-generation/data_mass_spec_benchmark/run_predictors.py
with
34 additions
and
21 deletions
downloads-generation/data_mass_spec_benchmark/GENERATE.sh
+
27
−
20
View file @
fb4bb8a2
...
...
@@ -96,9 +96,7 @@ else
fi
# Write out and process peptides.
# First just chr1 peptides, then all peptides.
# TODO: switch this back
for
subset
in
chr1 all
for
subset
in
all
do
if
[
"
$2
"
==
"reuse-all"
]
then
...
...
@@ -118,19 +116,33 @@ do
bzip2 proteome_peptides.
$subset
.csv
fi
# Run mixmhcpred
OUT_DIR
=
predictions/
${
subset
}
.mixmhcpred
REUSE
=
""
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
then
REUSE
=
"
$EXISTING_DATA
"
/
$OUT_DIR
fi
python run_predictors.py
\
proteome_peptides.
$subset
.csv.bz2
\
--result-dtype
"float16"
\
--predictor
mixmhcpred
\
--chunk-size
500000
\
--allele
$(
cat
alleles.txt
)
\
--out
"
$OUT_DIR
"
\
--worker-log-dir
"
$SCRATCH_DIR
/
$DOWNLOAD_NAME
"
\
--cluster-script-prefix-path
$SCRIPT_DIR
/cluster_submit_script_header.mssm_hpc.nogpu.lsf
\
--reuse-predictions
"
$REUSE
"
$EXTRA_ARGS
# Run netmhcpan4
for
kind
in
el ba
do
OUT_DIR
=
predictions/
${
subset
}
.netmhcpan4.
$kind
REUSE1
=
""
REUSE2
=
""
if
[
"
$subset
"
==
"all"
]
then
REUSE1
=
"predictions/chr1.netmhcpan4.
$kind
"
fi
REUSE
=
""
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
then
REUSE
2
=
"
$EXISTING_DATA
"
/
$OUT_DIR
REUSE
=
"
$EXISTING_DATA
"
/
$OUT_DIR
fi
python run_predictors.py
\
...
...
@@ -138,11 +150,11 @@ do
--result-dtype
"float16"
\
--predictor
netmhcpan4-
$kind
\
--chunk-size
1000
\
--allele
$(
cat
alleles.txt
|
grep
-v
'31:0102'
)
\
--allele
$(
cat
alleles.txt
)
\
--out
"
$OUT_DIR
"
\
--worker-log-dir
"
$SCRATCH_DIR
/
$DOWNLOAD_NAME
"
\
--cluster-script-prefix-path
$SCRIPT_DIR
/cluster_submit_script_header.mssm_hpc.nogpu.lsf
\
--reuse-predictions
"
$REUSE
1
"
"
$REUSE2
"
$EXTRA_ARGS
--reuse-predictions
"
$REUSE
"
$EXTRA_ARGS
done
...
...
@@ -150,15 +162,10 @@ do
for
kind
in
combined
do
OUT_DIR
=
predictions/
${
subset
}
.mhcflurry.
${
kind
}
REUSE1
=
""
REUSE2
=
""
if
[
"
$subset
"
==
"all"
]
then
REUSE1
=
"predictions/chr1.mhcflurry.
${
kind
}
"
fi
REUSE
=
""
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
&&
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-predictions-except-mhcflurry"
]
then
REUSE
2
=
"
$EXISTING_DATA
"
/
$OUT_DIR
REUSE
=
"
$EXISTING_DATA
"
/
$OUT_DIR
fi
python run_predictors.py
\
...
...
@@ -172,7 +179,7 @@ do
--out
"
$OUT_DIR
"
\
--worker-log-dir
"
$SCRATCH_DIR
/
$DOWNLOAD_NAME
"
\
--cluster-script-prefix-path
$SCRIPT_DIR
/cluster_submit_script_header.mssm_hpc.gpu.lsf
\
--reuse-predictions
"
$REUSE
1
"
"
$REUSE2
"
$EXTRA_ARGS
--reuse-predictions
"
$REUSE
"
$EXTRA_ARGS
done
done
...
...
This diff is collapsed.
Click to expand it.
downloads-generation/data_mass_spec_benchmark/run_predictors.py
+
7
−
1
View file @
fb4bb8a2
...
...
@@ -43,7 +43,7 @@ parser.add_argument(
parser
.
add_argument
(
"
--predictor
"
,
required
=
True
,
choices
=
(
"
mhcflurry
"
,
"
netmhcpan4-ba
"
,
"
netmhcpan4-el
"
))
choices
=
(
"
mhcflurry
"
,
"
netmhcpan4-ba
"
,
"
netmhcpan4-el
"
,
"
mixmhcpred
"
))
parser
.
add_argument
(
"
--mhcflurry-models-dir
"
,
metavar
=
"
DIR
"
,
...
...
@@ -90,6 +90,7 @@ PREDICTOR_TO_COLS = {
"
mhcflurry
"
:
[
"
affinity
"
],
"
netmhcpan4-ba
"
:
[
"
affinity
"
,
"
percentile_rank
"
],
"
netmhcpan4-el
"
:
[
"
elution_score
"
],
"
mixmhcpred
"
:
[
"
elution_score
"
],
}
...
...
@@ -392,6 +393,11 @@ def do_predictions_mhctools(work_item_dicts, constant_data=None):
alleles
=
alleles
,
program_name
=
"
netMHCpan-4.0
"
,
mode
=
"
elution_score
"
)
elif
predictor_name
==
"
mixmhcpred
"
:
predictor
=
mhctools
.
MixMHCpred
(
alleles
=
alleles
,
program_name
=
"
netMHCpan-4.0
"
,
mode
=
"
elution_score
"
)
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