Template:Pathway/Metabolic

From Metabolomics.JP
< Template:Pathway(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
 
{{#def:pathwayPosition|{{#if:{{{position|}}}|{{{position}}}|}}}}
 
{{#def:pathwayPosition|{{#if:{{{position|}}}|{{{position}}}|}}}}
  
{{#repeat:Pathway/Mapping|1|{{#cdr:{{{list}}}|&&}}|&&}}
+
{{#lua:
 +
  local list = {};
 +
  for line in stdin:gmatch("([^\n]+)") do
 +
    print("\n" .. line .. "\n");
 +
    if (line.substring(1,2) == 'R') then
 +
      line = line.substring(2);
 +
      for k, v in string.gmatch(line, "(%d%d?) (%d%d?) %d?%d? ?;") do
 +
      t[v] = k
 +
      print(v .. "-" .. k .. " ");
 +
      end
 +
    else
 +
      for k, v in string.gmatch(line, "(%d%d?) (%d%d?) %d?%d? ?;") do
 +
      t[k] = v
 +
      print(k .. "-" .. v .. " ");
 +
      end
 +
    end
 +
  end
 +
  table.sort(list);
 +
  for i,v in ipairs(list)
 +
    do print(v) end
 +
|{{#repeat:Pathway/Mapping|1|{{#cdr:{{{list}}}|&&}}|&&}}
 +
}}

Revision as of 05:38, 16 March 2009



Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox