Skip to content

Commit

Permalink
initial download and unzipping done
Browse files Browse the repository at this point in the history
  • Loading branch information
bhlieberman committed Jun 27, 2024
1 parent 13e0911 commit 95d8c83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ logs
/download
/list
/brick
/raw
2 changes: 1 addition & 1 deletion stages/01_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mkdir -p $listpath
cd $listpath;

# Define the FTP base address
export ftpbase=""
export ftpbase="https://ftp.ncbi.nlm.nih.gov/pub/lu/PubTator3/"

# Retrieve the list of files to download from FTP base address
wget --no-remove-listing $ftpbase
Expand Down
7 changes: 5 additions & 2 deletions stages/02_unzip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ cat $listpath/files.txt | tail -n +2 | xargs -P14 -n1 bash -c '
filename="${0%.*}"
echo $downloadpath/$0
echo $rawpath/$filename
unzip $downloadpath/$0 -d $rawpath/$filename
'
if [[ "$downloadpath/$0" == *.gz && "$downloadpath/$0" != *.tar.gz ]]; then
gunzip -d "$downloadpath/$0" -c > "$rawpath/$filename"
elif [[ "$downloadpath/$0" == *.tar.gz ]]; then
tar -xzvf "$downloadpath/$0" -C "$rawpath"
fi'

0 comments on commit 95d8c83

Please sign in to comment.