Sandbox

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
   local H = {};
 
   local H = {};
 
   local I = {};
 
   local I = {};
   for id, name in stdin:gmatch("&&(%w+).Common Name=&&(%S+)") do
+
   for id, name in stdin:gmatch("&&(%w+).Common Name=&&([%S ]+)") do
 
     name = string.lower(name);
 
     name = string.lower(name);
 
     for term in string.gmatch(name,"(%w+)") do
 
     for term in string.gmatch(name,"(%w+)") do
       if ((string.len(term) > 30)) then
+
       if ((string.len(term) < 5)) then
 
         if (H[term] == nil) then
 
         if (H[term] == nil) then
           H[term] = id; table.insert(I, term);
+
           table.insert(I, term);  
        else
+
      -- else
          H[term] = H[term] .. ";" .. id;
+
      --  H[term] = H[term] .. ";" .. id;
 
         end
 
         end
 +
        H[term] = id;
 
       end
 
       end
 
     end
 
     end

Revision as of 03:46, 2 October 2008

this is sandbox page.


Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox