From 5ae9c27439db00323df8e26fcc93a59320d344fd Mon Sep 17 00:00:00 2001 From: oracle5th Date: Mon, 20 Jun 2022 10:40:10 +0800 Subject: [PATCH 1/2] Update build_kraken2_db.sh Add -L option to the find command in listing all sequence files. This allows it to traverse symlinks in the library directory. --- scripts/build_kraken2_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_kraken2_db.sh b/scripts/build_kraken2_db.sh index a5dfa1e..6a339d0 100755 --- a/scripts/build_kraken2_db.sh +++ b/scripts/build_kraken2_db.sh @@ -32,7 +32,7 @@ function report_time_elapsed() { } function list_sequence_files() { - find library/ '(' -name '*.fna' -o -name '*.faa' ')' -print0 + find -L library/ '(' -name '*.fna' -o -name '*.faa' ')' -print0 } start_time=$(get_current_time) From adf944a149e2c7e73b64cb996a6e631733f57104 Mon Sep 17 00:00:00 2001 From: oracle5th Date: Mon, 20 Jun 2022 15:14:25 +0800 Subject: [PATCH 2/2] Update build_kraken2_db.sh --- scripts/build_kraken2_db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build_kraken2_db.sh b/scripts/build_kraken2_db.sh index 6a339d0..527dce2 100755 --- a/scripts/build_kraken2_db.sh +++ b/scripts/build_kraken2_db.sh @@ -66,14 +66,14 @@ fi echo "Creating sequence ID to taxonomy ID map (step 1)..." if [ -d "library/added" ]; then - find library/added/ -name 'prelim_map_*.txt' | xargs cat > library/added/prelim_map.txt + find -L library/added/ -name 'prelim_map_*.txt' | xargs cat > library/added/prelim_map.txt fi seqid2taxid_map_file=seqid2taxid.map if [ -e "$seqid2taxid_map_file" ]; then echo "Sequence ID to taxonomy ID map already present, skipping map creation." else step_time=$(get_current_time) - find library/ -maxdepth 2 -name prelim_map.txt | xargs cat > taxonomy/prelim_map.txt + find -L library/ -maxdepth 2 -name prelim_map.txt | xargs cat > taxonomy/prelim_map.txt if [ ! -s "taxonomy/prelim_map.txt" ]; then echo "No preliminary seqid/taxid mapping files found, aborting." exit 1