Template:Index/mass

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
 
(16 intermediate revisions by one user not shown)
Line 1: Line 1:
<noinclude>質量のインデクス {{{1}}} 最小値(デフォルト0) {{{2}}} 最大値(デフォルト1万) {{{3}}} ページタイトルと質量のリスト(&&区切り) {{{4}}} タイトルラベル{{{5}}} true/nil EXTMASS と AVGMASSの選択</noinclude>
+
<noinclude>質量のインデクス: {{{1}}} 最小値(デフォルト0) {{{2}}} 最大値(デフォルト1万) {{{3}}} 検索ページタイトル  {{{4}}} true/nil EXTMASS と AVGMASSの選択</noinclude>
Last updated: {{REVISIONTIMESTAMP}}
+
{{Warning/Persist}}
 +
 
 +
{| width=100%
 +
|-
 +
|align=left| {{Index/persist|{{#if:{{{4|}}}|exact mass|average mass}}|{{#expr:{{{1|0}}}-{{{2|0}}}+{{{1|0}}}}}|{{{1|0}}}|Index/mass|{{{3}}}|{{{4|}}}}}
 +
|align=center| [[Index:{{{3}}}|<big>Back to Index</big>]]
 +
|align=right| {{Index/persist|{{#if:{{{4|}}}|exact mass|average mass}}|{{{2|0}}}|{{#expr:{{{2|0}}}+{{{2|0}}}-{{{1|0}}}}}|Index/mass|{{{3}}}|{{{4|}}}}}
 +
|}
 +
<hr>
 +
 
 
{| class="wikitable" style="width=100%; margin: 1em auto; border-width:0px 0px 0px 0px;"
 
{| class="wikitable" style="width=100%; margin: 1em auto; border-width:0px 0px 0px 0px;"
 
|- style="background:#ccf"
 
|- style="background:#ccf"
!colspan="2"| {{{4|Molecular Index {{#if:{{{5|}}}|(exact mass)|(average mass)}} }}}
 
 
{{#repeat:IndexTable|1|
 
{{#repeat:IndexTable|1|
 
{{#lua:
 
{{#lua:
   local id, ms, msd, min, max;
+
   local id, ms, msd;
 +
  local min = {{{1|0}}};
 +
  local max = {{{2|2000}}};
 
   local hash = {};
 
   local hash = {};
 
   local idx = {};
 
   local idx = {};
  local first = true;
 
 
   for id, ms in stdin:gmatch("&&(%w+)&&([%d\.]+)") do
 
   for id, ms in stdin:gmatch("&&(%w+)&&([%d\.]+)") do
     if (first) then ---:はじめの値は質量の最小値と最大値
+
     msd = tonumber(ms); ---質量の最小と最大の間に入る部分のみ考慮
      min = tonumber(id);
+
    if ((msd >= min) and (msd <= max)) then
      max = tonumber(ms);
+
      if (hash[msd] == null)
      first = false;
+
        then hash[msd] = id;
    else
+
          table.insert(idx, msd);
      msd = tonumber(ms); ---質量の最小と最大の間に入る部分のみ考慮
+
        else hash[msd] = hash[msd].."&&"..id;
      if ((msd >= min) and (msd <= max)) then
+
        if (hash[msd] == null)
+
          then hash[msd] = id;
+
            table.insert(idx, msd);
+
          else hash[msd] = hash[msd].."&&"..id;
+
        end
+
 
       end
 
       end
 
     end
 
     end
Line 32: Line 35:
 
   end
 
   end
 
   print(output);
 
   print(output);
|&&{{{1|0}}}&&{{{2|10000}}} {{#if:{{{5|}}}| {{#extmass:{{{3|FL1C99}}}}}| {{#avgmass:{{{3|FL1C99}}}}} }}
+
|{{#if:{{{4|}}}| {{#extmass:{{{3|FL1C99}}}}}| {{#avemass:{{{3|FL1C99}}}}} }}
 
}}
 
}}
 
}}
 
}}
 
|}
 
|}

Latest revision as of 03:00, 25 March 2009

質量のインデクス: {{{1}}} 最小値(デフォルト0) {{{2}}} 最大値(デフォルト1万) {{{3}}} 検索ページタイトル {{{4}}} true/nil EXTMASS と AVGMASSの選択 Do not edit! This page is automatically generated using Persist function (Last updated: 20090325030030).

[[Index:{{{3}}}|Back to Index]]


Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox