Skip to content

Commit

Permalink
Update download.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
spiekos authored Jan 16, 2024
1 parent a9fcd0f commit e02a618
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions scripts/biomedical/pharmgkb-revised/download.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
#!/bin/bash

mkdir -p scratch; cd scratch
# downloads the chemical file

# download the Primary Data from pharmGKB
mkdir -p chemicals; cd chemicals
curl -L -O https://api.pharmgkb.org/v1/download/file/data/chemicals.zip
# downloads the drug file
unzip chemicals.zip

cd ../; mkdir -p drugs; cd drugs
curl -L -O https://api.pharmgkb.org/v1/download/file/data/drugs.zip
# downloads the gene file
unzip drugs.zip

cd ../; mkdir -p genes; cd genes
curl -L -O https://api.pharmgkb.org/v1/download/file/data/genes.zip
# downloads the relationship file
curl -L -O https://api.pharmgkb.org/v1/download/file/data/relationships.zip
# downloads the phenotype file
unzip genes.zip

cd ../; mkdir -p phenotypes; cd phenotypes
curl -L -O https://api.pharmgkb.org/v1/download/file/data/phenotypes.zip
# downloads the variant file
curl -L -O https://api.pharmgkb.org/v1/download/file/data/variants.zip
unzip phenotypes.zip

cd ../; mkdir -p variants; cd variants
curl -L -O https://api.pharmgkb.org/v1/download/file/data/variants.zip
unzip variants.zip

# download Relationships Data from pharmGKB
cd ../; mkdir -p relationships; cd relationships
curl -L -O https://api.pharmgkb.org/v1/download/file/data/relationships.zip
unzip relationships
cd ../

0 comments on commit e02a618

Please sign in to comment.