Template:MassBank/Matrix

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m
Line 233: Line 233:
  
 
   ---Main Program---
 
   ---Main Program---
   local ruler = nil;
+
   local ruler = nil; ---first line (list of fragments)---
   local fragments = {};
+
   local fragments = {}; ---following lines (head : tail style)---
 +
  local focus = {}; ---formulas that should be highlighted---
 
   local x, y;
 
   local x, y;
 
   ---Read Data---
 
   ---Read Data---
Line 243: Line 244:
 
       ---register fragments---
 
       ---register fragments---
 
       head, tail = string.match(line, "^&&(["..FORMULA_CHAR.."]+) *: *(["..FORMULA_CHAR.." ]+)$")
 
       head, tail = string.match(line, "^&&(["..FORMULA_CHAR.."]+) *: *(["..FORMULA_CHAR.." ]+)$")
 +
      if (string.match(head,"*")) then
 +
        head = string.gsub(head,"*", "")
 +
        focus[head] = head
 +
      end
 
       if (head ~= nil and tail ~= nil) then
 
       if (head ~= nil and tail ~= nil) then
         if (fragments[head] == nil) then y = {} else y = fragments[head] end
+
         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
 
           z = string.gsub(x,"*", "")
 
           z = string.gsub(x,"*", "")
Line 272: Line 278:
 
   ---Check Fragments---
 
   ---Check Fragments---
 
   for i,v in pairs(fragments) do
 
   for i,v in pairs(fragments) do
 +
    ---i is head, v is a list of fragments---
 
     if (not inRuler[i]) then print('<span style="color:red">Parent ion '..i..' does not exist.</span>') end
 
     if (not inRuler[i]) then print('<span style="color:red">Parent ion '..i..' does not exist.</span>') end
 
     for j,w in pairs(v) do
 
     for j,w in pairs(v) do
Line 291: Line 298:
 
   print("! {{PAGENAME}} \n")
 
   print("! {{PAGENAME}} \n")
 
   for i=1, table.getn(axis) do
 
   for i=1, table.getn(axis) do
     print("#style='text-align:right'# '''" .. mass(axis[i]) .. "'''<br/>" .. axis[i])
+
     ---If some fragments are 'focused' then highlight the axis---
 +
    if (focused[axis[i]] ~= nil) then
 +
      print("#style='text-align:right;color:red'# '''" .. mass(axis[i]) .. "'''<br/>" .. axis[i])
 +
    else
 +
      print("#style='text-align:right'# '''" .. mass(axis[i]) .. "'''<br/>" .. axis[i])
 +
    end
 
   end
 
   end
 
   ---Rows---
 
   ---Rows---

Revision as of 14:56, 7 April 2011

General Index

All Molecules
KOX PR PBX COX

Ion Frequency Prec.-Product Neutral Loss Help





150px

Contents

Top 10 Similar Molecules of

  1. KOX00662p Score:19.04
  2. KOX00276p Score:19.04
  3. KOX00039p Score:10.76
  4. KOX00795p Score:8.27
  5. KOX00740p Score:8.27
  6. KOX00739p Score:8.27
  7. KOX00547p Score:8.27
  8. KOX00292p Score:8.27
  9. KOX00102p Score:8.27
  10. KOX00700p Score:5.38

Links

Annotations

Precursor Product Comments
(0) (0) CHClFINOPS

Precursor-Product Relationship

./lua: /tmp/mw_ex_lua_xM6iGx:110: attempt to index global 'focused' (a nil value) No "ION INFO" line in the form &&(formula)&&(formula)&&...&&

MassBank/Matrix


(pos/neg)<<First Page   (pos/neg)<Previous Page

Next Page>(pos/neg)   Last Page>>(pos/neg)

Personal tools
Namespaces

Variants
Actions