-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSnake_biom
More file actions
79 lines (53 loc) · 1.59 KB
/
Snake_biom
File metadata and controls
79 lines (53 loc) · 1.59 KB
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
79
DADA_d = "dada"
Dbiom= DADA_d + "/biom_out"
rule barplots:
input: DADA_d + "/table.qza",
DADA_d + "/taxonomy.qza"
output:
DADA_d + "/barplots.qzv"
shell:
"qiime taxa barplot --i-table {input[0]} --i-taxonomy {input[1]} --o-visualization {output} --m-metadata-file metadata > {log}"
#барплоты не вышли - там какого-то файла не хватает, поищи metadata!
"""
rule convert:
input:
Dbiom + "/feature-table_meta.biom"
output:
Dbiom + "/feature-table_meta.txt"
shell:
"biom convert -i {input} -o {output} --to-tsv --table-type='OTU table' --header-key taxonomy"
rule sed_and_add_metadata:
input:
DADA_d + "/biom_out/feature-table.biom",
DADA_d + "/biom_out/taxonomy.tsv"
output:
Dbiom + "/feature-table_meta.biom",
Dbiom + "/sed_taxonomy.tsv"
log:
"logs/add_metadata.log"
shell:
y
sed '1s/.*/#OTU ID\ttaxonomy\tConfidence/' {input[1]} > {output[1]}
biom add-metadata -i {input[0]} -o {output[0]} --observation-metadata-fp {output[1]} --sc-separated taxonomy
y
rule export_table_i_taxonomy:
input:
DADA_d + "/table.qza",
DADA_d + "/taxonomy.qza"
output:
directory(Dbiom)
log:
"logs/export_table.log"
shell:
qiime tools export --input-path {input[0]} --output-path {output} > {log}
qiime tools export --input-path {input[1]} --output-path {output} > {log}
rule biom:
input:
DADA_d + "/table.qza"
output:
DADA_d + "/table_4050.qza"
log:
"logs/export_taxonomy.log"
shell:
"qiime feature-table rarefy --i-table {input} --p-sampling-depth 4050 --o-rarefied-table {output} > {log}"
"""