     authorize_dataset(dataset_name)
     authorize_group(group)
     [[group_id | _ ] | _] = group_info({:original,group})
-    # query = """
-# SELECT DISTINCT Strain.Id, StrainXRef.InbredSetId, Strain.Name, ProbeSetData.value, ProbeSetSE.error,
-  # ProbeSetData.Id
-# FROM (ProbeSetData as V, ProbeSetFreeze as D, ProbeFreeze as D2, Strain, StrainXRef as SX, ProbeSet, ProbeSetXRef as Locus)
-# LEFT JOIN ProbeSetSE on (ProbeSetSE.DataId = ProbeSetData.Id
-#   AND ProbeSetSE.StrainId = ProbeSetData.StrainId)
-# WHERE ProbeSet.Name = '#{marker}'
-  # AND ProbeSetXRef.ProbeSetId = ProbeSet.Id
-  # AND ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id
-  # AND StrainXRef.StrainId = Strain.Id
-  # AND StrainXRef.InbredSetId = #{group_id}
-  # AND ProbeSetFreeze.Name = '#{dataset_name}'
-  # AND ProbeSetXRef.DataId = ProbeSetData.Id
-  # AND ProbeSetData.StrainId = Strain.Id
-  # AND StrainXRef.StrainId = Strain.Id
-  # ORDER BY Strain.Id
-    # """
-
-    # IO.puts(query)
-    # {:ok, rows} = DB.query(query)
-    # for r <- rows, do: ( {strain_id,_,strain_name,value,stderr,_} = r;
-    #   [strain_id,strain_name,value,stderr]
-    # )
-
     query = from probesetdata in ProbeSetData,
       left_join: probesetse in ProbeSetSE,
       on: probesetdata.id == probesetse."DataId" and probesetdata."StrainId" == probesetse."StrainId",

# group by InbredSet.Name
    {:ok, %Mariaex.Result{columns: _columns, command: _command, connection_id: _connection_id, last_insert_id: _last_insert_id, num_rows: _num_rows, rows: rows }} = SQL.query(Repo, query, [species])
    rows
    # {:ok, rows} = DB.query(query)
    # for r <- rows, do: ( {id,name,fullname} = r; [id,name,fullname] )
  end

  def menu_types(species, group) do
    # query = """
    # select distinct Tissue.Name
    # from ProbeFreeze,ProbeSetFreeze,InbredSet,Tissue,Species
    # where Species.Name = '#{species}' and
      # Species.Id = InbredSet.SpeciesId and
      # InbredSet.Name = '#{group}' and
      # ProbeFreeze.TissueId = Tissue.Id and
      # ProbeFreeze.InbredSetId = InbredSet.Id and
      # ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and
      # ProbeSetFreeze.public > 0
      # order by Tissue.Name
    # """
    # {:ok, rows} = DB.query(query)
    # for r <- rows, do: ( {tissue} = r; [tissue] )

    query = from tab_species in Species,
      join: inbredset in InbredSet,
      on: tab_species.id == inbredset."SpeciesId",

        { :integer, i } -> {:id, i}
        { :string, s }  -> {:Name, s}
      end
    query = from species in Species,
      join: inbredset in InbredSet,
      on: species.id == inbredset."SpeciesId",
