Template:Pathway/Metabolic

From Metabolomics.JP
< Template:Pathway(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
 
   for line in stdin:gmatch("([^\n]+)") do
 
   for line in stdin:gmatch("([^\n]+)") do
 
     count = count+1;
 
     count = count+1;
     if (count==1) then
+
     if (count / 2 == 1) then
       --- First line
+
      --- do nothing for metabolite IDs ---
 +
    else if (count==2) then
 +
       --- First mapping line ---
 
       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
 
         list[k] = v;
 
         list[k] = v;
 
       end
 
       end
 
     else
 
     else
       --- Second and later lines
+
       --- Second and later lines ---
 
     print("\n" .. line .. "\n");
 
     print("\n" .. line .. "\n");
 
     if (string.sub(line,1,1) == 'R') then
 
     if (string.sub(line,1,1) == 'R') then

Revision as of 12:15, 16 March 2009


./lua: /tmp/mw_ex_lua_BohpCj:52: 'end' expected (to close 'for' at line 3) near '<eof>'

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox