diff --git a/Dockerfile b/Dockerfile index f82dfca..50f30e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,16 @@ WORKDIR /app RUN ulimit -d unlimited RUN apt-get update && apt-get upgrade -yy && apt-get install -yy build-essential software-properties-common \ - apt-transport-https libz-dev npm cmake parallel python3-openstackclient jq awscli unzip pandoc \ + apt-transport-https libz-dev npm cmake parallel python3-openstackclient jq unzip pandoc \ curl wget git libssl-dev libcurl4-openssl-dev libxml2-dev -y && \ npm i nugget -g && \ wget -P /tmp/ "https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh" && \ bash "/tmp/Miniconda3-py38_4.12.0-Linux-x86_64.sh" -b -p /usr/local/miniconda +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ + unzip awscliv2.zip \ + ./aws/install + COPY env.yml /app/env.yml ADD bin /usr/local/crux_bin diff --git a/tronko/build/tronko_build.sh b/tronko/build/tronko_build.sh index e6b19ca..58e8795 100755 --- a/tronko/build/tronko_build.sh +++ b/tronko/build/tronko_build.sh @@ -4,14 +4,12 @@ set -o allexport export AWS_MAX_ATTEMPTS=3 PARTITION_NUMBER=0 -while getopts "i:p:b:" opt; do +while getopts "i:p:" opt; do case $opt in i) RUNID="$OPTARG" ;; p) PRIMER="$OPTARG" ;; - b) PARTITION_NUMBER="$OPTARG" - ;; esac done @@ -33,6 +31,14 @@ partitions=$(ls ${newick}/*txt | wc -l) # sync down tronko output aws s3 sync s3://$BUCKET/CruxV2/$RUNID/$PRIMER/tronko $outdir --no-progress --endpoint-url https://js2.jetstream-cloud.org:8001/ +# Calculate b (PARTITION_NUMBER) +for i in {9999..999999}; do + if ! [[ -e "partition${i}.fasta" && -e "partition${i}_MSA.fasta" ]]; then + echo "The first number without both fasta files is: ${i}" + PARTITION_NUMBER=$i + break + fi +done if (( $partitions > 1 )) then