Skip to content

Instantly share code, notes, and snippets.

@arupgsh
Last active May 19, 2021 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arupgsh/e994e8b16ba6013f8c4f5400eb81bb72 to your computer and use it in GitHub Desktop.
Save arupgsh/e994e8b16ba6013f8c4f5400eb81bb72 to your computer and use it in GitHub Desktop.
#!/bin/bash
###################################################################
#Script Name : Nanoclust Demo
#Description : NanoCLUST installation test for Centos 7
#Author : Arup Ghosh
#Web : https://arup.dev
###################################################################
set -e
if groups $(whoami)| grep -q '\bdocker\b'; then
printf "User $(whoami) present in docker\nStarting the run\n\n"
else
printf "Add $(whoami) in docker group"
exit 1
fi
#get timestamp for foldername
timestamp=$(date +%s)
mkdir nct_${timestamp} && cd nct_${timestamp}
wait
printf "Folder created\n\n"
#clone the repo
git clone https://github.com/genomicsITER/NanoCLUST.git
printf "Repo cloned successfully\n\n"
#download and expand the blast db files
mkdir NanoCLUST/db NanoCLUST/db/taxdb
wget -4 https://ftp.ncbi.nlm.nih.gov/blast/db/16S_ribosomal_RNA.tar.gz
wget -4 https://ftp.ncbi.nlm.nih.gov/blast/db/16S_ribosomal_RNA.tar.gz.md5
wget -4 https://ftp.ncbi.nlm.nih.gov/blast/db/taxdb.tar.gz
wget -4 https://ftp.ncbi.nlm.nih.gov/blast/db/taxdb.tar.gz.md5
wait
cat *.md5| md5sum -c
wait
tar -xzvf 16S_ribosomal_RNA.tar.gz -C NanoCLUST/db
tar -xzvf taxdb.tar.gz -C NanoCLUST/db/taxdb
printf "Blast database downloaded successfully\n\n"
#download current version of nextflow
wget -4 https://github.com/nextflow-io/nextflow/releases/download/v21.04.1/nextflow-21.04.1-all && mv nextflow-21.04.1-all nextflow
wait
chmod a+x nextflow
#perform a test run to make sure installation is working fine
./nextflow run NanoCLUST/main.nf -profile test,docker --db "db/16S_ribosomal_RNA" --tax "db/taxdb/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment