Template:MassBank/IonFrequency
From Metabolomics.JP
(Difference between revisions)
m |
m |
||
Line 1: | Line 1: | ||
{| class ="wikitable sortable" | {| class ="wikitable sortable" | ||
− | ! formula || frequency || Pages | + | ! formula || mass || frequency || Pages |
{{#repeat:MassBank/IonFrequency/Row|1| | {{#repeat:MassBank/IonFrequency/Row|1| | ||
{{#Lua: | {{#Lua: | ||
Line 33: | Line 33: | ||
F = {}; | F = {}; | ||
for id, fgmts in stdin:gmatch("&&([%a%d]+)(&&[%S]+)") do | for id, fgmts in stdin:gmatch("&&([%a%d]+)(&&[%S]+)") do | ||
− | |||
− | |||
for fgmt in string.gmatch(fgmts, "&&([%a%d]+)") do | for fgmt in string.gmatch(fgmts, "&&([%a%d]+)") do | ||
− | |||
if (not F[fgmt]) then F[fgmt] = {id} else table.insert(F[fgmt],id) end | if (not F[fgmt]) then F[fgmt] = {id} else table.insert(F[fgmt],id) end | ||
end | end | ||
Line 44: | Line 41: | ||
for i,v in pairs(F) do | for i,v in pairs(F) do | ||
count = count + 1; | count = count + 1; | ||
− | print("&&"..i.."&&"..table.getn(v).."&&"..table.concat(v,",")); | + | print("&&"..i.."&&"..mass(i).."&&"..table.getn(v).."&&"..table.concat(v,",")); |
end | end | ||
| | | |