Commit 5ecad663 authored by kevin's avatar kevin

externalized container download

parent 58b7208c
...@@ -31,30 +31,11 @@ rule clean: ...@@ -31,30 +31,11 @@ rule clean:
# download the required singularity container from zenodo.org # download the required singularity container from zenodo.org
rule download_container: rule download_container:
output:
"container_unchecked.sif"
shell:
"""
wget https://zenodo.org/record/{config[zenodo_record_id]}/files/container.sif -O container_unchecked.sif
"""
# check md5
rule check_container:
input:
"container_unchecked.sif"
output: output:
"container.sif" "container.sif"
singularity:
"container_unchecked.sif"
shell: shell:
""" """
set -e bash scripts/download_container.sh
checksum=($(md5sum container_unchecked.sif))
if [ $checksum != {config[container_mdf5]} ]; then
echo md5 mismatch for container, download corrupted!
exit 1
fi
mv container_unchecked.sif container.sif
""" """
# extract dosages in custom PrediXcan format from vcf file # extract dosages in custom PrediXcan format from vcf file
......
...@@ -23,6 +23,3 @@ brain_regions: ...@@ -23,6 +23,3 @@ brain_regions:
- 'Putamen_basal_ganglia' - 'Putamen_basal_ganglia'
- 'Spinal_cord_cervical_c-1' - 'Spinal_cord_cervical_c-1'
- 'Substantia_nigra' - 'Substantia_nigra'
zenodo_record_id: '3376504'
container_mdf5: '1f5aada82c1aeb8e00b0328421ed009b'
wget https://zenodo.org/record/3376504/files/container.sif -O container.sif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment