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

First cut of models_class1_consensus download

parent 11ad19cd
No related merge requests found
#!/bin/bash
#
# Model select based on consensus (agreement with full ensemble).
# Uses models trained in models_class1_unselected download.
#
set -e
set -x
DOWNLOAD_NAME=models_class1_consensus
SCRATCH_DIR=${TMPDIR-/tmp}/mhcflurry-downloads-generation
SCRIPT_ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_DIR=$(dirname "$SCRIPT_ABSOLUTE_PATH")
mkdir -p "$SCRATCH_DIR"
rm -rf "$SCRATCH_DIR/$DOWNLOAD_NAME"
mkdir "$SCRATCH_DIR/$DOWNLOAD_NAME"
# Send stdout and stderr to a logfile included with the archive.
exec > >(tee -ia "$SCRATCH_DIR/$DOWNLOAD_NAME/LOG.txt")
exec 2> >(tee -ia "$SCRATCH_DIR/$DOWNLOAD_NAME/LOG.txt" >&2)
# Log some environment info
date
pip freeze
git status
cd $SCRATCH_DIR/$DOWNLOAD_NAME
mkdir models
PROCESSORS=$(getconf _NPROCESSORS_ONLN)
echo "Detected processors: $PROCESSORS"
time mhcflurry-class1-select-allele-specific-models \
--models-dir "$(mhcflurry-downloads path models_class1_unselected)/models" \
--out-models-dir models \
--scoring consensus \
--num-jobs $(expr $PROCESSORS \* 2)
time mhcflurry-calibrate-percentile-ranks \
--models-dir models \
--num-jobs $(expr $PROCESSORS \* 2)
--num-peptides-per-length 100000
cp $SCRIPT_ABSOLUTE_PATH .
bzip2 LOG.txt
tar -cjf "../${DOWNLOAD_NAME}.tar.bz2" *
echo "Created archive: $SCRATCH_DIR/$DOWNLOAD_NAME.tar.bz2"
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