Skip to content

Commit

Permalink
Merge pull request #51 from CALeDNA/develop
Browse files Browse the repository at this point in the history
update tronko-build.sh
  • Loading branch information
hector-baez authored Feb 1, 2024
2 parents 068f80e + b2474a8 commit 35affaf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 9 additions & 3 deletions tronko/build/tronko_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 35affaf

Please sign in to comment.