From dfa59a4d356b3fdbf5f5b1b6303be261a73971e9 Mon Sep 17 00:00:00 2001 From: Morgan Taylor Date: Thu, 25 Feb 2021 13:58:15 -0500 Subject: [PATCH 1/3] reduce memory for ImportGenomes and add this branch to dockstore yml --- .dockstore.yml | 1 + scripts/variantstore/wdl/ImportGenomes.wdl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.dockstore.yml b/.dockstore.yml index 0b9c4858a2b..7ee538df647 100644 --- a/.dockstore.yml +++ b/.dockstore.yml @@ -57,6 +57,7 @@ workflows: branches: - master - ah_var_store + - mmt_reduce_mem - name: funcotator subclass: WDL primaryDescriptorPath: /scripts/funcotator_wdl/funcotator.wdl diff --git a/scripts/variantstore/wdl/ImportGenomes.wdl b/scripts/variantstore/wdl/ImportGenomes.wdl index 962dfe5ce03..fccfdc4552c 100644 --- a/scripts/variantstore/wdl/ImportGenomes.wdl +++ b/scripts/variantstore/wdl/ImportGenomes.wdl @@ -210,10 +210,10 @@ task CreateImportTsvs { >>> runtime { docker: docker - memory: "10 GB" + memory: "3.75 GB" disks: "local-disk " + disk_size + " HDD" preemptible: select_first([preemptible_tries, 5]) - cpu: 2 + cpu: 1 } output { String done = "true" From d4907250fcbaf341d6b6f84c5ef92820be7d4f34 Mon Sep 17 00:00:00 2001 From: Morgan Taylor Date: Tue, 2 Mar 2021 17:55:31 -0500 Subject: [PATCH 2/3] do not fail bq load if no files to ingest --- scripts/variantstore/wdl/ImportGenomes.wdl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/variantstore/wdl/ImportGenomes.wdl b/scripts/variantstore/wdl/ImportGenomes.wdl index fccfdc4552c..b8e5b41cbb5 100644 --- a/scripts/variantstore/wdl/ImportGenomes.wdl +++ b/scripts/variantstore/wdl/ImportGenomes.wdl @@ -322,15 +322,22 @@ task LoadTable { # even for non-superpartitioned tables (e.g. metadata), the TSVs do have the suffix FILES="~{datatype}_${PADDED_TABLE_ID}_*" + NUM_FILES=$(gsutil ls "${DIR}${FILES}" | wc -l) + if [ ~{superpartitioned} = "true" ]; then TABLE="~{dataset_name}.${PREFIX}~{datatype}_${PADDED_TABLE_ID}" else TABLE="~{dataset_name}.${PREFIX}~{datatype}" fi - bq load --location=US --project_id=~{project_id} --skip_leading_rows=1 --source_format=CSV -F "\t" $TABLE $DIR$FILES ~{schema} || exit 1 - echo "ingested ${FILES} file from $DIR into table $TABLE" - gsutil mv $DIR$FILES ${DIR}done/ + if [ $NUM_FILES -gt 0 ]; then + bq load --location=US --project_id=~{project_id} --skip_leading_rows=1 --source_format=CSV -F "\t" $TABLE $DIR$FILES ~{schema} || exit 1 + echo "ingested ${FILES} file from $DIR into table $TABLE" + gsutil mv $DIR$FILES ${DIR}done/ + else + echo "no ${FILES} files to process in $DIR" + fi + >>> runtime { From 49f2c43a0a0db1b9dfa2378c08608ffc88756eb1 Mon Sep 17 00:00:00 2001 From: Morgan Taylor Date: Thu, 4 Mar 2021 10:41:30 -0500 Subject: [PATCH 3/3] remove feature branch from dockstore --- .dockstore.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.dockstore.yml b/.dockstore.yml index 7ee538df647..0b9c4858a2b 100644 --- a/.dockstore.yml +++ b/.dockstore.yml @@ -57,7 +57,6 @@ workflows: branches: - master - ah_var_store - - mmt_reduce_mem - name: funcotator subclass: WDL primaryDescriptorPath: /scripts/funcotator_wdl/funcotator.wdl