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
0805397e
Commit
0805397e
authored
5 years ago
by
Tim O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
16858d14
No related branches found
Branches containing commit
No related tags found
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
-28
27 additions, 28 deletions
downloads-generation/data_mass_spec_benchmark/GENERATE.sh
downloads-generation/data_mass_spec_benchmark/run_predictors.py
+12
-4
12 additions, 4 deletions
...ads-generation/data_mass_spec_benchmark/run_predictors.py
with
39 additions
and
32 deletions
downloads-generation/data_mass_spec_benchmark/GENERATE.sh
+
27
−
28
View file @
0805397e
...
@@ -98,8 +98,7 @@ fi
...
@@ -98,8 +98,7 @@ fi
# Write out and process peptides.
# Write out and process peptides.
# First just chr1 peptides, then all peptides.
# First just chr1 peptides, then all peptides.
# TODO: switch this back
# TODO: switch this back
#for subset in chr1 all
for
subset
in
chr1 all
for
subset
in
all chr1
do
do
if
[
"
$2
"
==
"reuse-all"
]
if
[
"
$2
"
==
"reuse-all"
]
then
then
...
@@ -120,30 +119,32 @@ do
...
@@ -120,30 +119,32 @@ do
fi
fi
# Run netmhcpan4
# Run netmhcpan4
OUT_DIR
=
predictions/
${
subset
}
.netmhcpan4
for
kind
in
el ba
REUSE1
=
""
do
REUSE2
=
""
OUT_DIR
=
predictions/
${
subset
}
.netmhcpan4.
$kind
if
[
"
$subset
"
==
"all"
]
REUSE1
=
""
then
REUSE2
=
""
#REUSE1="predictions/chr1.netmhcpan4"
if
[
"
$subset
"
==
"all"
]
# TODO: switch this back
then
REUSE1
=
"
$EXISTING_DATA
"
/predictions/chr1.netmhcpan4
REUSE1
=
"predictions/chr1.netmhcpan4.
$kind
"
fi
fi
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
then
then
REUSE2
=
"
$EXISTING_DATA
"
/
$OUT_DIR
REUSE2
=
"
$EXISTING_DATA
"
/
$OUT_DIR
fi
fi
python run_predictors.py
\
proteome_peptides.
$subset
.csv.bz2
\
--result-dtype
"float16"
\
--predictor
netmhcpan4-
$kind
\
--chunk-size
10000
\
--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
"
$REUSE1
"
"
$REUSE2
"
$EXTRA_ARGS
done
python run_predictors.py
\
proteome_peptides.
$subset
.csv.bz2
\
--result-dtype
"float16"
\
--predictor
netmhcpan4
\
--chunk-size
10000
\
--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
"
$REUSE1
"
"
$REUSE2
"
$EXTRA_ARGS
# Run MHCflurry
# Run MHCflurry
for
kind
in
with_mass_spec no_mass_spec
for
kind
in
with_mass_spec no_mass_spec
...
@@ -153,9 +154,7 @@ do
...
@@ -153,9 +154,7 @@ do
REUSE2
=
""
REUSE2
=
""
if
[
"
$subset
"
==
"all"
]
if
[
"
$subset
"
==
"all"
]
then
then
#REUSE1="predictions/chr1.mhcflurry.${kind}"
REUSE1
=
"predictions/chr1.mhcflurry.
${
kind
}
"
# TODO: switch this back
REUSE1
=
"
$EXISTING_DATA
"
/predictions/chr1.mhcflurry.
${
kind
}
fi
fi
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
&&
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-predictions-except-mhcflurry"
]
if
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-none"
]
&&
[
"
${
2
:-
reuse
-none
}
"
!=
"reuse-predictions-except-mhcflurry"
]
then
then
...
...
This diff is collapsed.
Click to expand it.
downloads-generation/data_mass_spec_benchmark/run_predictors.py
+
12
−
4
View file @
0805397e
...
@@ -43,7 +43,7 @@ parser.add_argument(
...
@@ -43,7 +43,7 @@ parser.add_argument(
parser
.
add_argument
(
parser
.
add_argument
(
"
--predictor
"
,
"
--predictor
"
,
required
=
True
,
required
=
True
,
choices
=
(
"
mhcflurry
"
,
"
netmhcpan4
"
))
choices
=
(
"
mhcflurry
"
,
"
netmhcpan4
-ba
"
,
"
netmhcpan4-el
"
))
parser
.
add_argument
(
parser
.
add_argument
(
"
--mhcflurry-models-dir
"
,
"
--mhcflurry-models-dir
"
,
metavar
=
"
DIR
"
,
metavar
=
"
DIR
"
,
...
@@ -88,7 +88,8 @@ add_cluster_parallelism_args(parser)
...
@@ -88,7 +88,8 @@ add_cluster_parallelism_args(parser)
PREDICTOR_TO_COLS
=
{
PREDICTOR_TO_COLS
=
{
"
mhcflurry
"
:
[
"
affinity
"
],
"
mhcflurry
"
:
[
"
affinity
"
],
"
netmhcpan4
"
:
[
"
affinity
"
,
"
percentile_rank
"
,
"
elution_score
"
],
"
netmhcpan4-ba
"
:
[
"
affinity
"
,
"
percentile_rank
"
],
"
netmhcpan4-el
"
:
[
"
elution_score
"
],
}
}
...
@@ -376,9 +377,16 @@ def do_predictions_mhctools(work_item_dicts, constant_data=None):
...
@@ -376,9 +377,16 @@ def do_predictions_mhctools(work_item_dicts, constant_data=None):
result
=
{}
result
=
{}
results
.
append
((
work_item_num
,
result
))
results
.
append
((
work_item_num
,
result
))
if
predictor_name
==
"
netmhcpan4
"
:
if
predictor_name
==
"
netmhcpan4
-ba
"
:
predictor
=
mhctools
.
NetMHCpan4
(
predictor
=
mhctools
.
NetMHCpan4
(
alleles
=
alleles
,
program_name
=
"
netMHCpan-4.0
"
)
alleles
=
alleles
,
program_name
=
"
netMHCpan-4.0
"
,
mode
=
"
binding_affinity
"
)
elif
predictor_name
==
"
netmhcpan4-el
"
:
predictor
=
mhctools
.
NetMHCpan4
(
alleles
=
alleles
,
program_name
=
"
netMHCpan-4.0
"
,
mode
=
"
elution_score
"
)
else
:
else
:
raise
ValueError
(
"
Unsupported
"
,
predictor_name
)
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