-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract popv model/reference data download
- Loading branch information
Showing
10 changed files
with
284 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
OUTPUT_DIR=${3:-"./popv"} | ||
|
||
mkdir -p "$OUTPUT_DIR" | ||
/download-models.sh "$1" "$OUTPUT_DIR/models" | ||
/download-reference-data.sh "$2" "$OUTPUT_DIR/reference-data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Defined by user: MODELS_DIR and ZENODO_MODELS_ID | ||
MODELS_TMP_DIR=$MODELS_DIR/tmp | ||
MODELS_ID=${1:?"A zenodo models id must be provided to download!"} | ||
MODELS_DIR=${2:-"./popv/models"} | ||
|
||
mkdir -p $MODELS_DIR $MODELS_TMP_DIR | ||
mkdir -p $MODELS_DIR | ||
zenodo_get $MODELS_ID -o $MODELS_DIR | ||
|
||
pip install 'zenodo_get@git+https://github.com/dvolgyes/zenodo_get' | ||
zenodo_get $ZENODO_MODELS_ID -o $MODELS_TMP_DIR | ||
for ARCHIVE in $MODELS_DIR/*.tar.gz; do | ||
MODEL=$(basename -s .tar.gz $ARCHIVE) | ||
DIR="$MODELS_DIR/$MODEL" | ||
|
||
for archive in $MODELS_TMP_DIR/*.tar.gz; do | ||
NAME=`basename $archive .tar.gz` | ||
mkdir -p $MODELS_DIR/${NAME} | ||
tar zx -C $MODELS_DIR/${NAME} -f $archive | ||
if [[ ! -d $DIR || -z $(ls -A $DIR) ]]; then | ||
mkdir -p $DIR | ||
tar zx -C $DIR -f $ARCHIVE | ||
fi | ||
done | ||
|
||
rm -rf $MODELS_TMP_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
REFERENCE_DATA_ID=${1:?"A zenodo reference data id must be provided to download!"} | ||
REFERENCE_DATA_DIR=${2:-"./popv/reference-data"} | ||
|
||
mkdir -p $REFERENCE_DATA_DIR | ||
zenodo_get $REFERENCE_DATA_ID -o $REFERENCE_DATA_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
{ | ||
"UBERON:0001255": "pretrained_models_Bladder_ts", | ||
"UBERON:0000178": "pretrained_models_Blood_ts", | ||
"UBERON:0002371": "pretrained_models_Bone_Marrow_ts", | ||
"UBERON:0000970": "pretrained_models_Eye_ts", | ||
"UBERON:0004548": "pretrained_models_Eye_ts", | ||
"UBERON:0004549": "pretrained_models_Eye_ts", | ||
"UBERON:0000948": "pretrained_models_Heart_ts", | ||
"UBERON:0000059": "pretrained_models_Large_Intestine_ts", | ||
"UBERON:0002107": "pretrained_models_Liver_ts", | ||
"UBERON:0002048": "pretrained_models_Lung_ts", | ||
"UBERON:0001004": "pretrained_models_Lung_ts", | ||
"UBERON:0000029": "pretrained_models_Lymph_Node_ts", | ||
"UBERON:0002509": "pretrained_models_Lymph_Node_ts", | ||
"UBERON:0001911": "pretrained_models_Mammary_ts", | ||
"UBERON:0001264": "pretrained_models_Pancreas_ts", | ||
"UBERON:0002367": "pretrained_models_Prostate_ts", | ||
"UBERON:0000079": "pretrained_models_Prostate_ts", | ||
"UBERON:0002097": "pretrained_models_Skin_ts", | ||
"UBERON:0002108": "pretrained_models_Small_Intestine_ts", | ||
"UBERON:0002106": "pretrained_models_Spleen_ts", | ||
"UBERON:0002370": "pretrained_models_Thymus_ts", | ||
"UBERON:0003126": "pretrained_models_Trachea_ts", | ||
"UBERON:0000995": "pretrained_models_Uterus_ts", | ||
"UBERON:0004537": "pretrained_models_Vasculature_ts" | ||
"UBERON:0001255": "Bladder", | ||
"UBERON:0000178": "Blood", | ||
"UBERON:0002371": "Bone_Marrow", | ||
"UBERON:0000970": "Eye", | ||
"UBERON:0004548": "Eye", | ||
"UBERON:0004549": "Eye", | ||
"UBERON:0000948": "Heart", | ||
"UBERON:0000059": "Large_Intestine", | ||
"UBERON:0002107": "Liver", | ||
"UBERON:0002048": "Lung", | ||
"UBERON:0001004": "Lung", | ||
"UBERON:0000029": "Lymph_Node", | ||
"UBERON:0002509": "Lymph_Node", | ||
"UBERON:0001911": "Mammary", | ||
"UBERON:0001264": "Pancreas", | ||
"UBERON:0002367": "Prostate", | ||
"UBERON:0000079": "Prostate", | ||
"UBERON:0002097": "Skin", | ||
"UBERON:0002108": "Small_Intestine", | ||
"UBERON:0002106": "Spleen", | ||
"UBERON:0002370": "Thymus", | ||
"UBERON:0003126": "Trachea", | ||
"UBERON:0000995": "Uterus", | ||
"UBERON:0004537": "Vasculature" | ||
} |
Oops, something went wrong.