   end
 
   def phenotype_info(dataset_name,marker,group) do
-    authorize(dataset_name)
+    authorize_dataset(dataset_name)
+    authorize_group(group)
     [[group_id | _ ] | _] = group_info(group)
     query = """
 SELECT DISTINCT Strain.Id, SX.InbredSetId, Strain.Name, V.value, ProbeSetSE.error,

  end

  def phenotypes(dataset_name, start, stop) do
    authorize(dataset_name)
    dataset_id =
      case use_type(dataset_name) do
        { :integer, i } -> i

    end
  end

  defp authorize_group(group_name) do
    if group_name != "BXD" do
      raise "Authorization error for " <> group_name
    end
  end

  defp authorize_dataset(dataset_name) do
    subq =
      case use_type(dataset_name) do
        { :integer, i } -> "D.id = #{i}"
