-
Notifications
You must be signed in to change notification settings - Fork 1
/
5-2.evaluating_GetOrganelle_animal_mitogenomes.sh
executable file
·78 lines (75 loc) · 10.5 KB
/
5-2.evaluating_GetOrganelle_animal_mitogenomes.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
66
67
68
69
70
71
72
73
74
75
76
77
78
mkdir GetOrganelle-animal-mitogenome-eval
# create label files
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5620467-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5620467
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--ERR1856354-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base ERR1856354
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5056303-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5056303
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR3879971-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR3879971
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR2179962-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR2179962
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1041081-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1041081
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1581065-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1581065
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5769010-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5769010
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR4340274-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR4340274
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1743021-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1743021
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR4782254-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR4782254
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5132384-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5132384
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR611174-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR611174
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR2132981-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR2132981
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5201683-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5201683
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR305235-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR305235
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1950515-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1950515
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR2318706-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR2318706
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR941879-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR941879
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR2730309-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR2730309
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR3953043-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR3953043
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR955308-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR955308
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5875655-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5875655
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5878339-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5878339
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR4095109-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR4095109
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR847379-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR847379
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR329682-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR329682
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1284940-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1284940
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--DRR014695-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base DRR014695
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5527082-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5527082
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--ERR1952738-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base ERR1952738
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR2737540-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR2737540
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR940268-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR940268
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5860573-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5860573
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR3041429-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR3041429
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR4339879-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR4339879
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR836315-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR836315
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR2717571-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR2717571
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5863004-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5863004
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR3098386-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR3098386
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR039541-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR039541
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--DRR095708-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base DRR095708
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1946581-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1946581
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR136494-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR136494
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1298377-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1298377
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1566160-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1566160
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--ERR466754-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base ERR466754
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1200276-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1200276
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1300141-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1300141
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR748049-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR748049
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR5495100-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR5495100
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1657027-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1657027
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1055280-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1055280
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR1822107-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR1822107
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR747928-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR747928
slim_fastg.py -F animal_mt `ls GetOrganelle-animal-mitogenome/auto--SRR620242-mitogenome/*.fasta | head -n1` --out-dir GetOrganelle-animal-mitogenome-eval --out-base SRR620242
# only keep the label files
rm GetOrganelle-animal-mitogenome-eval/*.fasta
# summary
python << END
import os
samples = [x for x in os.listdir("GetOrganelle-animal-mitogenome-eval") if x.endswith(".csv")]
with open("GetOrganelle-animal-mitogenome-eval/summary.tab", "w") as output_h:
for s in samples:
with open(os.path.join("GetOrganelle-animal-mitogenome-eval", s)) as input_h:
head = input_h.readline()
genes = []
for line in input_h:
if line.strip():
genes.extend(line.split("\t")[2].split(","))
genes = sorted(set(genes))
output_h.write(s.replace(".csv", "") + "\t" + str(len(genes)) + "\t" + ",".join(genes) + "\n")
END