Template:MassBank/Matrix
From Metabolomics.JP
(Difference between revisions)
(3 intermediate revisions by one user not shown) | |||
Line 28: | Line 28: | ||
|} | |} | ||
− | =Top 10 Similar Molecules of {{#var:NAME}}= | + | ==Top 10 Similar Molecules of {{#var:NAME}}== |
− | {| class="collapsible collapsed" | + | {| class="wikitable collapsible collapsed" |
− | ! About | + | ! Ranking |
+ | ! About scoring | ||
|- | |- | ||
− | |||
− | |||
| | | | ||
− | |||
− | |||
{{#repeat:MassBank/Matrix/RankingLink|1| | {{#repeat:MassBank/Matrix/RankingLink|1| | ||
{{#lua: | {{#lua: | ||
Line 97: | Line 94: | ||
}} | }} | ||
}} | }} | ||
+ | |valign="top"| | ||
+ | The similarity score between two molecules is defined as the sum of Shannon entropy of ionic formulas shared by the molecules: | ||
+ | <math>\textstyle - \sum_{p\in shared} \log(\mbox{frequency}(p))</math> | ||
+ | <br/> | ||
+ | 代謝物間の類似度スコアは、それらのスペクトルで共有される(アノテートされた)イオン式のシャノン情報量の総和です。 | ||
+ | |} | ||
+ | |||
=Links= | =Links= | ||
+ | {| class="wikitable collapsible collapsed" | ||
+ | ! Page list for each fragment | ||
+ | |- | ||
+ | | | ||
{{#repeat:MassBank/SearchFgmt|1| | {{#repeat:MassBank/SearchFgmt|1| | ||
{{#lua: | {{#lua: | ||
Line 110: | Line 118: | ||
|{{{data|CHClFINOPS}}} | |{{{data|CHClFINOPS}}} | ||
}}|&&}} | }}|&&}} | ||
+ | |} | ||
− | =Annotations= | + | ==Annotations== |
{{#ifeq:{{NAMESPACE}}|Ojima| | {{#ifeq:{{NAMESPACE}}|Ojima| | ||
<div style="float:right"> | <div style="float:right"> | ||
Line 179: | Line 188: | ||
|~|{{#bar:}}}} | |~|{{#bar:}}}} | ||
− | =Precursor-Product Relationship= | + | ==Precursor-Product Relationship== |
{| class="collapsible collapsed" | {| class="collapsible collapsed" | ||
! colspan="2"| About the PP Table (行列表示について) | ! colspan="2"| About the PP Table (行列表示について) | ||
Line 233: | Line 242: | ||
---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 253: | ||
---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 287: | ||
---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 307: | ||
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 (focus[axis[i]] ~= nil) then | ||
+ | print("#style='text-align:right;background:red'# '''" .. mass(axis[i]) .. "'''<br/>" .. axis[i]) | ||
+ | else | ||
+ | print("#style='text-align:right'# '''" .. mass(axis[i]) .. "'''<br/>" .. axis[i]) | ||
+ | end | ||
end | end | ||
---Rows--- | ---Rows--- | ||
Line 308: | Line 329: | ||
print('#style="background-color:skyblue"# ' .. s) | print('#style="background-color:skyblue"# ' .. s) | ||
elseif (fragments[axis[j]][axis[i].."**"] ~= nil) then | elseif (fragments[axis[j]][axis[i].."**"] ~= nil) then | ||
− | print('#style="background-color: | + | print('#style="background-color:orange"# ' .. s) |
elseif (fragments[axis[j]][axis[i].."***"] ~= nil) then | elseif (fragments[axis[j]][axis[i].."***"] ~= nil) then | ||
print('#style="background-color:beige"# ' .. s) | print('#style="background-color:beige"# ' .. s) |
Latest revision as of 16:27, 7 April 2011
General Index | Ion Frequency | Prec.-Product | Neutral Loss | Help |
IDs and Links | |
---|---|
MassBank | [1] |
CAS | |
Keio ID |
Contents[hide] |
[edit] Top 10 Similar Molecules of
[show] Ranking | About scoring |
---|
[edit] Links
[show] Page list for each fragment |
---|
[edit] Annotations
Precursor | Product | Comments |
---|---|---|
(0) | (0) | CHClFINOPS |
[edit] Precursor-Product Relationship
[show] About the PP Table (行列表示について) |
---|
No "ION INFO" line in the form &&(formula)&&(formula)&&...&&
[hide] MassBank/Matrix | 210 CHClFIONSP |
---|---|
210 CHClFIONSP |
|