Template:Pathway/Metabolic

From Metabolomics.JP
< Template:Pathway(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
  
 
{|
 
{|
{{#repeat:Pathway/MetabolicTable|3|
+
{{#repeat:Pathway/MetabolicTable|4|<!----
{{#lua:
+
4行の出力内訳
 +
1 ... mapping pagetitle
 +
2 ... mapping direction
 +
3 ... mapped position
 +
4 ... target molecular ID
 +
--->{{#lua:
 
   local list = {};
 
   local list = {};
 
   local count = 0;
 
   local count = 0;
 
   for line in stdin:gmatch("([^\n]+)") do
 
   for line in stdin:gmatch("([^\n]+)") do
 
     count = count+1;
 
     count = count+1;
     if ((count % 3 == 1) or (count % 3 == 0)) then
+
     if (count % 3 ~= 2) then
 
       --- do nothing for AtomMaps and metabolite IDs ---
 
       --- do nothing for AtomMaps and metabolite IDs ---
 
       print(line);
 
       print(line);
Line 26: Line 31:
 
           for k, v in string.gmatch(line, "(%d%d?) (%d%d?) %d?%d? ?;") do
 
           for k, v in string.gmatch(line, "(%d%d?) (%d%d?) %d?%d? ?;") do
 
             map[v] = k;
 
             map[v] = k;
            --print(v .. "-" .. k .. " ");
 
 
           end
 
           end
 
         else
 
         else
Line 32: Line 36:
 
           for k, v in string.gmatch(line, "(%d%d?) (%d%d?) %d?%d? ?;") do
 
           for k, v in string.gmatch(line, "(%d%d?) (%d%d?) %d?%d? ?;") do
 
             map[k] = v;
 
             map[k] = v;
            --print(k .. "-" .. v .. " ");
 
 
           end
 
           end
 
         end
 
         end
Line 44: Line 47:
 
           end
 
           end
 
         end
 
         end
         print(str);
+
         print(str); -- output 3rd line
 
         list = list2;
 
         list = list2;
 
       end
 
       end
Line 51: Line 54:
 
         str = str .. k .. " ";
 
         str = str .. k .. " ";
 
       end
 
       end
       print(str);
+
       print(str); -- output 4th line
 
     end
 
     end
 
   end
 
   end
  --table.sort(list);
 
  --for i,v in ipairs(list)
 
  -- do print(v) end
 
 
|{{#repeat:Pathway/Mapping|1|{{#cdr:{{{list}}}|&&}}|&&}}
 
|{{#repeat:Pathway/Mapping|1|{{#cdr:{{{list}}}|&&}}|&&}}
 
}}
 
}}
 
}}
 
}}
 
|}
 
|}

Revision as of 13:40, 16 March 2009


Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox