-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathamphora2.sh
61 lines (35 loc) · 1.85 KB
/
amphora2.sh
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#---define directories
#rhizosphere
#bindir="/datos/fgutzwiller/genome_extraction/bins/rhizosphere_2017/dastool/dasTool_DASTool_bins"
#resultsdir="/datos/fgutzwiller/genome_extraction/bins_annotation/rhizosphere_2017/amphora2"
#sediments
bindir="/datos/fgutzwiller/genome_extraction/bins/sediments_marDeCortes/dastool/dasTool_DASTool_bins"
resultsdir="/datos/fgutzwiller/genome_extraction/bins_annotation/sediments_marDeCortes/amphora2"
tmpbindir="/datos/fgutzwiller/genome_extraction/bins_annotation/sediments_marDeCortes/amphora2/tmp_bin"
source activate amphora2
#amphora will add iteratively the results to results already in folder. To start again, other files need to be erased
#run amphora2 with default parameters on bins selected by DASTool
for i in `ls $bindir/*.fa`
do
bin=$(basename "$i" )
#separate archae bins from bacterial
if [[ $bin =~ ^(sediments.055.fasta.contigs.fa|metabat.13.fa_sub.contigs.fa)$ ]]; then
cat $i | sed -e "s/>/>${bin}_/g" > $tmpbindir/$bin
cd $resultsdir/archae
perl /home/fgutzwiller/programs/amphora2/AMPHORA2/Scripts/MarkerScanner.pl -Archaea -DNA $tmpbindir/$bin
rm $tmpbindir/$bin
else
cat $i | sed -e "s/>/>${bin}_/g" > $tmpbindir/$bin
cd $resultsdir/bact
perl /home/fgutzwiller/programs/amphora2/AMPHORA2/Scripts/MarkerScanner.pl -Bacteria -DNA $tmpbindir/$bin
rm $tmpbindir/$bin
fi
done
cd $resultsdir/bact
perl /home/fgutzwiller/programs/amphora2/AMPHORA2/Scripts/MarkerAlignTrim.pl -WithReference -OutputFormat phylip
perl /home/fgutzwiller/programs/amphora2/AMPHORA2/Scripts/Phylotyping.pl -CPUs 5 > phylotype.result
cd $resultsdir/archae
perl /home/fgutzwiller/programs/amphora2/AMPHORA2/Scripts/MarkerAlignTrim.pl -WithReference -OutputFormat phylip
perl /home/fgutzwiller/programs/amphora2/AMPHORA2/Scripts/Phylotyping.pl -CPUs 5 > phylotype.result
source deactivate amphora2