Sandbox4
| Line 14: | Line 14: | ||
}} | }} | ||
| + | ===Family Distribution=== | ||
{{#lua: | {{#lua: | ||
T = {} | T = {} | ||
total = 0 | total = 0 | ||
| + | tfam = 0 | ||
for family, num in stdin:gmatch("([%a]+) ([%d]+)") do | for family, num in stdin:gmatch("([%a]+) ([%d]+)") do | ||
total = total + num | total = total + num | ||
| − | if (T[family] == null) then T[family] = num else T[family] = T[family] + num end | + | if (T[family] == null) then T[family] = tonumber(num) tfam = tfam + 1 else T[family] = T[family] + num end |
end | end | ||
| − | + | S = {} | |
| − | + | I = {} | |
| − | S = {} I = {} | + | |
for k,v in pairs(T) do | for k,v in pairs(T) do | ||
if (S[v] == null) then S[v] = { k } table.insert(I,v) else table.insert(S[v], k) end | if (S[v] == null) then S[v] = { k } table.insert(I,v) else table.insert(S[v], k) end | ||
end | end | ||
| − | |||
| − | |||
table.sort(I) | table.sort(I) | ||
| − | + | print('{{{#bar:}} class="wikitable"') | |
| − | T = S[ | + | print('{{#bar:}}-') |
| − | + | print('! #metabolite {{#bar:}}{{#bar:}} Total '..total..' metabolites in '..tfam..' families') | |
| − | + | for i=table.getn(I), 1, -1 do | |
| − | + | print('{{#bar:}}-') | |
| + | T = S[I[i]] | ||
| + | print("{{#bar:}}"..I[i].."{{#bar:}}{{#bar:}}") | ||
| + | for j,w in pairs(T) do | ||
| + | print("[[:Category:"..w.."{{#bar:}}"..w.."]]; ") | ||
| + | end | ||
end | end | ||
| − | + | print("{{#bar:}}}") | |
| {{#repeat:Stats/Family/GetFamilyName|1|{{#var:stat}} }} | | {{#repeat:Stats/Family/GetFamilyName|1|{{#var:stat}} }} | ||
| + | }} | ||
| + | |||
| + | ===Order Distribution=== | ||
| + | {{#lua: | ||
| + | T = {} | ||
| + | total = 0 | ||
| + | tord = 0 | ||
| + | for order, num in stdin:gmatch("([%a]+) ([%d]+)") do | ||
| + | total = total + num | ||
| + | if (T[order] == null) then T[order] = tonumber(num) tord = tord + 1 else T[order] = T[order] + num end | ||
| + | end | ||
| + | S = {} | ||
| + | I = {} | ||
| + | for k,v in pairs(T) do | ||
| + | if (S[v] == null) then S[v] = { k } table.insert(I,v) else table.insert(S[v], k) end | ||
| + | end | ||
| + | table.sort(I) | ||
| + | print('{{{#bar:}} class="wikitable"') | ||
| + | print('{{#bar:}}-') | ||
| + | print('! #metabolite {{#bar:}}{{#bar:}} Total '..total..' metabolites in '..tord..' orders') | ||
| + | for i=table.getn(I), 1, -1 do | ||
| + | print('{{#bar:}}-') | ||
| + | T = S[I[i]] | ||
| + | print("{{#bar:}}"..I[i].."{{#bar:}}{{#bar:}}") | ||
| + | print(table.concat(T, "; ")) | ||
| + | end | ||
| + | print("{{#bar:}}}") | ||
| + | | {{#repeat:Stats/Family/GetOrderName|1|{{#var:stat}} }} | ||
}} | }} | ||
Revision as of 22:52, 10 December 2009
Family Distribution
| #metabolite | Total 455 metabolites in 63 families |
|---|---|
| 106 | |
| 30 | |
| 29 | |
| 23 | |
| 19 | |
| 16 | |
| 15 | |
| 13 | |
| 12 | |
| 11 | |
| 10 | |
| 9 | |
| 8 | |
| 6 | |
| 5 | |
| 4 |
Schisandraceae; Pandaceae; Myristicaceae; Salicaceae; Ulmaceae; Asteraceae; Crassulaceae; Apocynaceae; Pinaceae; |
| 3 |
Gleicheniaceae; Hamamelidaceae; Cupressaceae; Malvaceae; Brassicaceae; Cunoniaceae; |
| 2 |
Ephedraceae; Rhamnaceae; Ochnaceae; Poaceae; Elaeagnaceae; Cochlospermaceae; Olacaceae; Altingiaceae; Actinidiaceae; Moraceae; Betulaceae; |
| 1 |
Orchidaceae; Dryopteridaceae; Amaryllidaceae; Ruscaceae; Dennstaedtiaceae; Daphniphyllaceae; Malpighiaceae; Phyllanthaceae; Meliaceae; Campanulaceae; Aizoaceae; Erythroxylaceae; Symplocaceae; Rhodomelaceae; Nothofagaceae; Sapindaceae; |
Order Distribution
| #metabolite | Total 442 metabolites in 29 orders |
|---|---|
| 106 |
Fabales |
| 39 |
Ericales |
| 33 |
Rosales |
| 32 |
Malpighiales |
| 29 |
Laurales |
| 22 |
Coniferales |
| 21 |
Malvales |
| 20 |
Caryophyllales |
| 16 |
Fagales; Celastrales |
| 15 |
Saxifragales |
| 14 |
Gentianales; Polypodiales |
| 9 |
Arecales |
| 8 |
Vitales; Myrtales |
| 6 |
Ginkgoales |
| 5 |
Asterales |
| 4 |
Magnoliales; Austrobaileyales |
| 3 |
Asparagales; Brassicales; Oxalidales; Gleicheniales |
| 2 |
Poales; Ephedrales; Sapindales; Santalales |
| 1 |
Ceramiales |