Sandbox

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 59: Line 59:
 
FL3
 
FL3
 
FL4}}
 
FL4}}
 
{| class="wikitable" style="width=100%; margin: 1em auto; border-width:0px 0px 0px 0px;"
 
|- style="background:#ccf"
 
!colspan="2"| Molecular Index (exact mass)
 
{{#repeat:IndexTable|1|
 
{{#lua:
 
  local id, ms, msd, min, max;
 
  local hash = {};
 
  local idx = {};
 
  local first = true;
 
  for id, ms in stdin:gmatch("&&(%w+)&&([%d\.]+)") do
 
    if (first) then ---:はじめの値は質量の最小値と最大値
 
      min = tonumber(id);
 
      max = tonumber(ms);
 
      first = false;
 
    else
 
      msd = tonumber(ms); ---質量の最小と最大の間に入る部分のみ考慮
 
      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
 
  table.sort(idx);
 
  local output = "";
 
  for id, val in pairs(idx) do
 
    output = output .. val .."&&".. hash[val] .. "\n";
 
  end
 
  print(output);
 
|&&{{{1|0}}}&&{{{2|10000}}} {{#extmass:{{{3|FL}}} }}}}
 
}}
 
|}
 

Revision as of 11:57, 27 April 2008

this is sandbox page.

このページでは、変数を使用しています。


{{#graph:
pie(円グラフ)もしくはpie3(3D円グラフ)(後で、折れ線グラフ、棒グラフをサポートする予定)
横サイズx縦サイズ(ex. 300x400)
データ(,区切り)
ラベル(,区切り)
タイトル
}}

FL1 FL4


FL1 FL2 FL3 FL4

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox