Template:Pathway/Metabolic
From Metabolomics.JP
< Template:Pathway(Difference between revisions)
Line 10: | Line 10: | ||
--- First line | --- First 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; | |
end | end | ||
else | else | ||
Line 24: | Line 24: | ||
end | end | ||
--- Leave only positions that can be mapped | --- Leave only positions that can be mapped | ||
+ | local list2 = {}; | ||
for k, v in pairs(list) do | for k, v in pairs(list) do | ||
− | if (map[ | + | if (map[k] ~= nil) then list2[map[k]] = map[k]; end |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
end | end | ||
+ | list = list2; | ||
else | else | ||
--- Create standard mapping | --- Create standard mapping | ||
Line 39: | Line 37: | ||
end | end | ||
--- Leave only positions that can be mapped | --- Leave only positions that can be mapped | ||
+ | local list2 = {}; | ||
for k, v in pairs(list) do | for k, v in pairs(list) do | ||
− | if (map[ | + | if (map[k] ~= nil) then list2[map[k]] = map[k]; end |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
end | end | ||
+ | list = list2; | ||
end | end | ||
end | end |
Revision as of 06:58, 16 March 2009