You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# overwrite fileFormat variable; get it from input fasta_file
25
+
fileFormat=$(echo $IN| awk -F. '{print $NF}')
26
+
export fileFormat
27
+
22
28
#mandatory options
23
29
task=$"-task ${task}"# e.g. blastn, megablast
24
30
strands=$"-strand ${strands}"# both, plus
@@ -42,30 +48,30 @@ fi
42
48
source /scripts/submodules/framework.functions.sh
43
49
44
50
#output dir
45
-
output_dir=$"/input/taxonomy_out"
51
+
output_dir=$"/input/taxonomy_out.blast"
46
52
47
53
#############################
48
54
### Start of the workflow ###
49
55
#############################
56
+
echo"output_dir = $output_dir"
57
+
if [[ -d$output_dir ]];then
58
+
rm -rf $output_dir
59
+
fi
60
+
mkdir $output_dir
61
+
62
+
### Start time
63
+
start_time=$(date)
50
64
start=$(date +%s)
51
65
52
66
### Check if files with specified extension exist in the dir
53
67
first_file_check
54
68
55
-
### Prepare working env and check single-end data
56
-
prepare_SE_env
57
-
58
69
#If input is compressed, then decompress (keeping the compressed file, but overwriting if filename exists!)
59
70
check_gz_zip_SE
60
71
61
72
### Check input formats (fasta supported)
62
73
check_extension_fasta
63
74
64
-
### Select last fasta file in the folder as input for BLAST
65
-
forfilein*.$fileFormat;do
66
-
IN=$(echo $file)
67
-
done
68
-
echo"input = $IN"
69
75
70
76
### Check and assign BLAST database
71
77
d1=$(echo $db1| awk 'BEGIN{FS=OFS="."}{print $NF}')#get the extension
@@ -286,11 +292,15 @@ db_x=$(echo $db1 | sed -e 's/\/extraFiles\///')
286
292
# Make README.txt file
287
293
printf"# Taxonomy was assigned using BLAST (see 'Core command' below for the used settings).
288
294
295
+
Start time: $start_time
296
+
End time: $(date)
297
+
Runtime: $runtime seconds
298
+
289
299
Query = $IN
290
300
Database = $db_x
291
301
292
-
BLAST_1st_best_hit.txt = BLAST results for the 1st best hit in the used database (sim_score and adj_qcov appended).
293
-
BLAST_10_best_hits.txt = BLAST results for the 10 best hits in the used database, with sim_score and adj_qcov inserted after pident in each block.
302
+
BLAST_1st_best_hit.txt = BLAST results for the 1st best hit in the used database
303
+
BLAST_10_best_hits.txt = BLAST results for the 10 best hits in the used database
294
304
295
305
BLAST values field separator is '+'. When pasting the taxonomy results to e.g. Excel, then first denote '+' as the field separator to align the columns.
296
306
@@ -318,8 +328,6 @@ adj_qcov = adjusted query coverage; if qlen > slen then ((send-sstart+1)/slen)*
0 commit comments