-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path08_derep.bash
executable file
·37 lines (29 loc) · 979 Bytes
/
08_derep.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
target=$1
dataset=$2
scr=$(readlink -f "$0")
pkg=$(dirname "$scr")
if [[ ! -n $target || ! -n $dataset ]] ; then
echo "Usage: $0 target_folder dataset
target_folder Path to the target folder containing the data
dataset Name of the dataset to process
"
exit 0
fi
# We don't need the genome_diversity_pipeline environment for this one
#. "$pkg/00_env.bash"
cd "$target"
dir="08_derep/$dataset"
miga new -P "$dir" -t genomes
miga add -P "$dir" -t popgenome -i assembly \
-R '^(?:.*\/)?(.+?)(?i:\.f[nastq]+)?$' \
--prefix maxbin_ -v 06_maxbin/"$dataset"-*/*.fasta
miga add -P "$dir" -t popgenome -i assembly \
-R '^(?:.*\/)?(.+?)(?i:\.f[nastq]+)?$' \
--prefix metabat_ -v 07_metabat/"$dataset"-*/*.fa
miga derep_wf -o "$dir" --fast -j 12 -t 1 -v
# load miga environment to run this ruby script.
eval "$(miga env)"
"$pkg/scripts/08_01_gsp_qual.rb" "$dir" > "$dir/method_qual.tsv"
# Launch next step
"$pkg/00_launcher.bash" . "$dataset" 09