forked from biocommons/uta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(IPVC-2440/IPVC-2442): specify input and output schema names, mov…
…e one time workflows (#38)
- Loading branch information
Showing
6 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# docker compose file for the NCBI gene_id update and backfill procedure | ||
|
||
version: '3' | ||
|
||
services: | ||
uta-gene-update: | ||
image: uta-update | ||
command: misc/gene-update/upgrade-uta-schema.sh ${UTA_ETL_NEW_UTA_VERSION} | ||
depends_on: | ||
uta: | ||
condition: service_healthy | ||
volumes: | ||
- ${UTA_ETL_NCBI_DIR}:/ncbi-dir | ||
- ${UTA_ETL_WORK_DIR}:/uta-gene-update/work | ||
- ${UTA_ETL_LOG_DIR}:/uta-gene-update/logs | ||
working_dir: /opt/repos/uta | ||
network_mode: host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# docker compose file for the mito transcript extraction for the UTA update procedure | ||
|
||
version: '3' | ||
|
||
services: | ||
mito-extract: | ||
image: uta-update | ||
command: sbin/ncbi_process_mito.py NC_012920.1 --output-dir /mito-extract/work | tee /mito-extract/logs/mito.log | ||
volumes: | ||
- ${UTA_ETL_WORK_DIR}:/mito-extract/work | ||
- ${UTA_ETL_LOG_DIR}:/mito-extract/logs | ||
working_dir: /opt/repos/uta | ||
network_mode: host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,14 @@ | |
set -euxo pipefail | ||
|
||
source_uta_v=$1 | ||
ncbi_dir=$2 | ||
working_dir=$3 | ||
log_dir=$4 | ||
dest_uta_v=$2 | ||
ncbi_dir=$3 | ||
working_dir=$4 | ||
log_dir=$5 | ||
|
||
if [ -z "$source_uta_v" ] || [ -z "$ncbi_dir" ] || [ -z "$working_dir" ] || [ -z "$log_dir" ] | ||
if [ -z "$source_uta_v" ] || [ -z "$dest_uta_v" ] || [ -z "$ncbi_dir" ] || [ -z "$working_dir" ] || [ -z "$log_dir" ] | ||
then | ||
echo 'Usage: uta-load <source_uta_v> <ncbi_dir> <working_dir> <log_dir>' | ||
echo 'Usage: uta-load <source_uta_v> <dest_uta_v> <ncbi_dir> <working_dir> <log_dir>' | ||
exit 1 | ||
fi | ||
|
||
|
@@ -66,3 +67,9 @@ uta --conf=etc/global.conf --conf=etc/[email protected] align-exons 2>&1 | | |
|
||
### run diff | ||
sbin/uta-diff "$source_uta_v" "$loading_uta_v" | ||
|
||
## Rename schema to destination schema name and export to dump file | ||
psql -h localhost -U uta_admin -d uta -c "DROP SCHEMA IF EXISTS $dest_uta_v CASCADE;" | ||
psql -h localhost -U uta_admin -d uta -c "ALTER SCHEMA uta RENAME TO $dest_uta_v"; | ||
pg_dump -h localhost -U uta_admin -d uta -n "$dest_uta_v" | \ | ||
gzip -c > "$working_dir/$dest_uta_v.pgd.gz" |