Template:MassBank/NeutralLoss

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m (New page: {{#lua: FORMULA_PAT = "(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(F?[2-9]?)(I?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)" FORMULA_CHAR = "CHFINOPSl0-9" ATOM = {"C"...)
 
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{#lua:
 
{{#lua:
   FORMULA_PAT = "(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(F?[2-9]?)(I?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)"
+
   FORMULA_PAT = "(C?l?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(F?[2-9]?)(I?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)"
   FORMULA_CHAR = "CHFINOPSl0-9"
+
   FORMULA_CHAR = "CHFINOPSl0-9*"
 
   ATOM = {"C", "H", "Cl", "F", "I", "N", "O", "P", "S"}
 
   ATOM = {"C", "H", "Cl", "F", "I", "N", "O", "P", "S"}
 
   MASS = {12, 1, 35, 19, 127, 14, 16, 31, 32}
 
   MASS = {12, 1, 35, 19, 127, 14, 16, 31, 32}
Line 47: Line 47:
 
   local x, y;
 
   local x, y;
 
   ---Read Data---
 
   ---Read Data---
   for line in stdin:gmatch("[%S ,]+") do
+
   for line in stdin:gmatch("&&[%w]+(&&[%S ,]+)") do
 
     if (string.find(line, "^&&[&%a%d]+&&$") ~= nil)  
 
     if (string.find(line, "^&&[&%a%d]+&&$") ~= nil)  
 
       then ruler = string.gsub(line, "&&", " ")
 
       then ruler = string.gsub(line, "&&", " ")
Line 75: Line 75:
 
   countOrange=0
 
   countOrange=0
 
   countGray=0
 
   countGray=0
   for i=1, table.getn(axis) do
+
   for i=1, table.getn(axis) do ---Row i
 
     for j=1, i-1 do
 
     for j=1, i-1 do
 
         s = diff(axis[j],axis[i]);
 
         s = diff(axis[j],axis[i]);
Line 89: Line 89:
 
     end
 
     end
 
   end
 
   end
   print(countBlack)
+
   print("{{{1}}}" .." ".. countBlack .." "..countOrange .." ".. countGray)
  print(countOrage)
+
  print(countGray)
+
 
|
 
|
{{MassBank:KOX00002}}
+
{{#SearchLine:^&&|Ojima|{{{1|KOX00174p}}}}}
 
}}
 
}}

Latest revision as of 14:50, 26 July 2010

&&KOX00174p&&C9H14N3O5&&C5H9O4&&C4H6N3O&&C4H3N2O&&C4H4N3&&C3H5N2&& &&KOX00174p&&C9H14N3O5: C5H9O4 &&KOX00174p&&C9H14N3O5: C4H6N3O &&KOX00174p&&C9H14N3O5: C4H3N2O** C4H4N3** &&KOX00174p&&C9H14N3O5: C3H5N2 &&KOX00174p&&C4H6N3O: C4H3N2O &&KOX00174p&&C4H6N3O: C4H4N3 &&KOX00174p&&C4H6N3O: C3H5N2

7 6 2
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox