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

modified scripts/download_genomic_library.sh #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
35 changes: 21 additions & 14 deletions scripts/download_genomic_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# viruses - NCBI RefSeq complete viral DNA and RNA genomes
# human - NCBI RefSeq GRCh38 human reference genome

# these are the old version, new version is already much better

set -u # Protect against uninitialized vars.
set -e # Stop on error

Expand All @@ -33,6 +35,24 @@ FTP_SERVER="ftp://$NCBI_SERVER"
RSYNC_SERVER="rsync://$NCBI_SERVER"
THIS_DIR=$PWD

download_plasmid() {
echo downloading plasmids from NCBI refseq
mkdir -p $LIBRARY_DIR/Plasmids
cd $LIBRARY_DIR/Plasmids
if [ ! -e "lib.complete" ]; then
rm -f *.fna.gz
#wget $FTP_SERVER/genomes/Plasmids/plasmids.all.fna.tar.gz
wget $FTP_SERVER/genomes/refseq/plasmid/plasmid.1.1.genomic.fna.gz
wget $FTP_SERVER/genomes/refseq/plasmid/plasmid.2.1.genomic.fna.gz
echo -n "Unpacking..."
gunzip *.gz
echo " complete."
touch "lib.complete"
else
echo "Skipping download of plasmids, already downloaded here."
fi
}

case "$1" in
"bacteria")
mkdir -p $LIBRARY_DIR/Bacteria
Expand All @@ -51,20 +71,7 @@ case "$1" in
fi
;;
"plasmids")
mkdir -p $LIBRARY_DIR/Plasmids
cd $LIBRARY_DIR/Plasmids
if [ ! -e "lib.complete" ]
then
rm -f plasmids.all.fna.tar.gz
wget $FTP_SERVER/genomes/Plasmids/plasmids.all.fna.tar.gz
echo -n "Unpacking..."
tar zxf plasmids.all.fna.tar.gz
rm plasmids.all.fna.tar.gz
echo " complete."
touch "lib.complete"
else
echo "Skipping download of plasmids, already downloaded here."
fi
download_plasmid
;;
"viruses")
mkdir -p $LIBRARY_DIR/Viruses
Expand Down