Volatile:MetaboliteDistribution

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m (New page: {{#def:stat| {{#lua: local T = {} total = 0 for genus in stdin:gmatch("&&([%a]+) [-%a%. ]+&&[%a%d]+") do total = total + 1 if (T[genus] == null) then T[genus] = 1 else T[genu...)
 
m
 
(12 intermediate revisions by one user not shown)
Line 13: Line 13:
 
|{{#SearchLine:{{{1|FL63}}}|Reference}} }}
 
|{{#SearchLine:{{{1|FL63}}}|Reference}} }}
 
}}
 
}}
 +
 +
{|
 +
|-
 +
|
 +
{{#graph:pie|size=400x200;margin=0,0,0,0;title=Top 5 Families for class {{{1}}};legend=0.65x0.45;label=;
 +
{{#lua:
 +
  T = {}
 +
  total = 0
 +
  tfam = 0
 +
  for family, num in stdin:gmatch("([%a]+) ([%d]+)") do
 +
    total = total + num
 +
    if (T[family] == null) then T[family] = tonumber(num) tfam = tfam + 1 else T[family] = T[family] + 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)
 +
  for i=table.getn(I), math.max(table.getn(I)-4,1),-1 do
 +
    T = S[I[i]]
 +
    print(table.concat(T," ").."="..I[i]*table.getn(T)..";")
 +
    total=total-(I[i]*table.getn(T))
 +
  end
 +
  print("others="..total)
 +
| {{#repeat:Stats/Family/GetFamilyName|1|{{#var:stat}} }}
 +
}}
 +
}}
 +
| The number in each family is counted as the number of genera (not species) listed in our registered references. Each reference record is accessible by clicking the link in compound pages. The taxonomy follows the [[Doc:Scientific_name|APG-II classification]].
 +
|}
  
 
==Family Distribution==
 
==Family Distribution==
Line 35: Line 65:
 
   print('{{#bar:}}-')
 
   print('{{#bar:}}-')
 
     T = S[I[i]]
 
     T = S[I[i]]
 +
    if (table.getn(T) == 1) then
 
     print("{{#bar:}}"..I[i].." ("..string.format("%.2f",100*I[i]/total).."%){{#bar:}}{{#bar:}}")
 
     print("{{#bar:}}"..I[i].." ("..string.format("%.2f",100*I[i]/total).."%){{#bar:}}{{#bar:}}")
 +
    else
 +
    print("{{#bar:}}"..I[i].." ("..string.format("%.2f",100*I[i]/total).."%) each {{#bar:}}{{#bar:}}")
 +
    end
 
     for j,w in pairs(T) do
 
     for j,w in pairs(T) do
 
       print("[[:Category:"..w.."{{#bar:}}"..w.."]]; ")
 
       print("[[:Category:"..w.."{{#bar:}}"..w.."]]; ")
Line 84: Line 118:
 
     print(k.." "..table.concat(T[k], "; "))
 
     print(k.." "..table.concat(T[k], "; "))
 
   end
 
   end
|{{#SearchLine:FL63|Reference}} }}
+
|{{#SearchLine:{{{1|FL63}}}|Reference}} }}
 
}}
 
}}

Latest revision as of 10:38, 11 December 2009


The number in each family is counted as the number of genera (not species) listed in our registered references. Each reference record is accessible by clicking the link in compound pages. The taxonomy follows the APG-II classification.

[edit] Family Distribution

[edit] Order Distribution

[edit] Details

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox