Skip to content

Commit

Permalink
feat: add verbosity control
Browse files Browse the repository at this point in the history
  • Loading branch information
matinnuhamunada committed Jun 28, 2024
1 parent 5db2b79 commit 13e3c0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions full_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ rm -f "$ERROR_FILE"
# Copy the database if it does not exist
if [ ! -f antismash_db.duckdb ]; then
cp "$SCRIPT_DIR/duckdb-schema/antismash_db.duckdb" antismash_db.duckdb
echo "Database copied."
echo "Copied database from empty schema."
else
echo "Database already exists."
fi
Expand All @@ -77,6 +77,9 @@ fi
log() {
if [ "$VERBOSE" = true ]; then
echo "$1"
VERBOSE_FLAG="--verbose"
else
VERBOSE_FLAG=""
fi
}

Expand All @@ -90,7 +93,7 @@ find "$SEQDIR" -name "*.json" | while read -r infile; do
continue
fi
log "Importing $infile"
if "$SCRIPT_DIR/db-import/import_json.py" --taxonomy "$SCRIPT_DIR/asdb_cache.json" "$infile" --allowed_assembly_prefix "$ALLOWED_ASSEMBLY_PREFIX"; then
if "$SCRIPT_DIR/db-import/import_json.py" --taxonomy "$SCRIPT_DIR/asdb_cache.json" "$infile" --allowed_assembly_prefix "$ALLOWED_ASSEMBLY_PREFIX" $VERBOSE_FLAG; then
echo "$infile" >> imported.txt
else
echo "$infile" >> "$ERROR_FILE"
Expand Down

0 comments on commit 13e3c0c

Please sign in to comment.