Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tronko-build.sh #51

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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