-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1.3.evaluate.sh
66 lines (60 loc) · 2.7 KB
/
1.3.evaluate.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
58
59
60
61
62
63
64
65
######################################################################
#It seems, Trinity meta-assembly is better than Oases
#From altogether assemblies, trinity is MUCH better than Oases
#See TRANSRATE ASSEMBLY SCORE overall statistics and other figures
######################################################################
outd=$HOME/axSA_assemblies/drap
grep -B40 'p good contigs' metaRF_*/00-META-ASSEMBLY_RATING | less
grep -B40 'p good contigs' *norm_altogether/00-ASSEMBLY_RATING |less
grep -A5 'TRANSRATE ASSEMBLY SCORE' metaRF_*/00-META-ASSEMBLY_RATING | less
grep -A5 'TRANSRATE ASSEMBLY SCORE' *norm_altogether/00-ASSEMBLY_RATING
######################################################################
#Compare the merged trinity assembly with altogether
######################################################################
bdir=$HOME/tools/annotation/busco
pyt=/share/apps/python/3.6.4/bin/python3
for d in trinity_norm_altogether metaRF_trinity; do
for bdb in eukaryota_odb9 protists_ensembl; do
bdb_p=$(echo $bdb | cut -d'_' -f1)
cmd="$pyt $bdir/scripts/run_BUSCO.py \
-i $outd/$d/transcripts_fpkm_1.fa \
-m transcriptome \
-o busco_${bdb_p}_${d} \
-l $bdir/$bdb \
-t ./tmp_${bdb_p}_$d \
-c 9 -f > busco.${bdb_p}_${d}.log 2>&1 &"
eval $cmd
done
done
rm -rf tmp_*
grep -A2 'Results:' busco.*.log
cp -r run_busco_* busco.*.log $outd/
as=oases
outd=$HOME/axSA_assemblies/drap
for d in ${as}_norm_altogether metaRF_${as}; do
for bdb in eukaryota_odb9 protists_ensembl; do
bdb_p=$(echo $bdb | cut -d'_' -f1)
cmd="${bdir}/scripts/run_BUSCO.py \
-i $outd/$d/transcripts_fpkm_1.fa \
-m transcriptome \
-o busco_${bdb_p}_${d} \
-l $bdir/$bdb \
-t ./tmp_${bdb_p}_$d \
-c 9 -f > busco.${bdb_p}_${d}.log 2>&1 &"
eval "$cmd"
#echo "$cmd"
done
done
######################################################################
#Run Assessment between trinity assemblies
######################################################################
ln -s transcripts_fpkm_1.fa $outd/metaRF_trinity/metaRF_trinity_fpkm_1.fa
ln -s transcripts_fpkm_1.fa $outd/trinity_norm_altogether/trinity_norm_altogether_fpkm_1.fa
cmd="runAssessment \
--assemblies $outd/metaRF_trinity/metaRF_trinity_fpkm_1.fa,$outd/trinity_norm_altogether/trinity_norm_altogether_fpkm_1.fa \
--R1 $tempd/reads/altogether/norm.R1.fq.gz \
--R2 $tempd/reads/altogether/norm.R2.fq.gz \
--busco-lineage eukaryota_odb9 \
--outdir $tempd/trinity_assessment"
eval "$cmd &> runAssessment.trinity.log" &
#To restart assessment after failure, run eval again once error is fixed