Template:MassBank/Matrix
From Metabolomics.JP
(Difference between revisions)
m |
m |
||
Line 55: | Line 55: | ||
head, tail = string.match(line, "^(["..FORMULA_CHAR.."]+) *: *(["..FORMULA_CHAR.." ]+)$") | head, tail = string.match(line, "^(["..FORMULA_CHAR.."]+) *: *(["..FORMULA_CHAR.." ]+)$") | ||
if (head ~= nil and tail ~= nil) then | if (head ~= nil and tail ~= nil) then | ||
− | y = {} | + | if (fragments[head] == nil) then y = {} else y = fragments[head] end |
for x in string.gmatch(tail,"["..FORMULA_CHAR.."]+") do | for x in string.gmatch(tail,"["..FORMULA_CHAR.."]+") do | ||
y[x] = x | y[x] = x | ||
Line 79: | Line 79: | ||
---Check Fragments--- | ---Check Fragments--- | ||
for i,v in pairs(fragments) do | for i,v in pairs(fragments) do | ||
− | if ( | + | if (y[i] == nil) then print("<big>Fragment "..i.." does not exist.</big>") end |
for j,w in pairs(v) do | for j,w in pairs(v) do | ||
− | if ( | + | if (y[j] == nil) then print("<big>Fragment "..j.." does not exist.</big>") end |
end | end | ||
end | end |
Revision as of 00:19, 14 May 2009
No 'ION INFO' line in the form &&(formula)&&(formula)&&...&&
MassBank/Matrix | 64 CHClONSP |
64 CHClONSP |
|