Skip to content
Snippets Groups Projects
Commit 0805397e authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

fix

parent 16858d14
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment