Last active
February 9, 2018 14:09
-
-
Save zachcp/d82ccb7fadbb3458d1e6f904e7a06985 to your computer and use it in GitHub Desktop.
Antismash 4.0.1 Docker Error with Clusterblast
This file contains hidden or 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
| # Download NRPS/PKS CLusters | |
| AS4 = run_AS_4.sh | |
| # Abysomycin as Example PKS BGC1 | |
| PKS.gb: | |
| wget -O $@ http://mibig.secondarymetabolites.org/repository/BGC0000001/BGC0000001.1.final.gbk | |
| PKS_AS4/PKS/BGC0000001.1.final.gbk: PKS.gb | |
| bash $(AS4) PKS.gb PKS_AS4 --clusterblast --knownclusterblast --subclusterblast --smcogs --verbose | |
| all: PKS_AS4/PKS/BGC0000001.1.final.gbk |
This file contains hidden or 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
| #!/bin/bash | |
| set -o errexit | |
| set -o nounset | |
| function realpath() { | |
| echo $(readlink -f $1 2>/dev/null || python -c "import sys; import os; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1) | |
| } | |
| # handle input file | |
| readonly INPUT_FILE=$(basename $1) | |
| readonly INPUT_DIR=$(dirname $(realpath $1)) | |
| shift | |
| # handle output file | |
| readonly OUTPUT_DIR=$(realpath $1) | |
| shift | |
| # Links within the container | |
| readonly CONTAINER_SRC_DIR=/input | |
| readonly CONTAINER_DST_DIR=/output | |
| if [ ! -d ${OUTPUT_DIR} ]; then | |
| mkdir ${OUTPUT_DIR} | |
| fi | |
| # ideally, the input directory would be mounted read only, but currently | |
| # antiSMASH doesn't support parsing from a read only file | |
| docker run \ | |
| --volume ${INPUT_DIR}:${CONTAINER_SRC_DIR}:ro \ | |
| --volume ${OUTPUT_DIR}:${CONTAINER_DST_DIR}:rw \ | |
| --detach=false \ | |
| --rm \ | |
| --user=$(id -u):$(id -g) \ | |
| antismash/standalone:4.0.1 \ | |
| ${INPUT_FILE} \ | |
| $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment