Template:Index/mass
From Metabolomics.JP
(Difference between revisions)
| Line 12: | Line 12: | ||
{{#repeat:IndexTable|1| | {{#repeat:IndexTable|1| | ||
{{#lua: | {{#lua: | ||
| − | local id, ms, msd | + | local id, ms, msd; |
| + | local min = {{{1|0}}}; | ||
| + | local max = {{{2|2000}}}; | ||
local hash = {}; | local hash = {}; | ||
local idx = {}; | local idx = {}; | ||
| − | |||
for id, ms in stdin:gmatch("&&(%w+)&&([%d\.]+)") do | for id, ms in stdin:gmatch("&&(%w+)&&([%d\.]+)") do | ||
| − | + | 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 | ||
| Line 38: | Line 33: | ||
end | end | ||
print(output); | print(output); | ||
| − | | | + | |{{#if:{{{4|}}}| {{#extmass:{{{3|FL1C99}}}}}| {{#avemass:{{{3|FL1C99}}}}} }} |
}} | }} | ||
}} | }} | ||
|} | |} | ||
Revision as of 10:53, 2 May 2008
質量のインデクス: {{{1}}} 最小値(デフォルト0) {{{2}}} 最大値(デフォルト1万) {{{3}}} 検索ページタイトル {{{4}}} true/nil EXTMASS と AVGMASSの選択 Last updated: 20080502105306
| [[Index:{{{3}}}|Back to Index]] |