File: clean_db.sh

package info (click to toggle)
kraken2 2.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,124 kB
  • sloc: cpp: 4,557; python: 2,014; perl: 1,281; sh: 515; makefile: 69
file content (18 lines) | stat: -rwxr-xr-x 583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Copyright 2013-2023, Derrick Wood <dwood@cs.jhu.edu>
#
# This file is part of the Kraken 2 taxonomic sequence classification system.

# Removes intermediate files from a database directory,
# such as reference library FASTA files and taxonomy data from NCBI.

set -u  # Protect against uninitialized vars.
set -e  # Stop on error

cd $KRAKEN2_DB_NAME
previous_usage=$(du -sh | cut -f1)
1>&2 echo "Database disk usage: $previous_usage"
rm -rf library/ taxonomy/ seqid2taxid.map
current_usage=$(du -sh | cut -f1)
1>&2 echo "After cleaning, database uses $current_usage"