   end
 
   def marker_info(species,marker) do
-      query = """
-SELECT Geno.Chr, Geno.Mb, Species.Id,Geno.source FROM Geno, Species
-WHERE Species.Name = '#{species}'
-AND Geno.Name = '#{marker}'
-     """
+#       query = """
+# SELECT Geno.Chr, Geno.Mb, Species.Id,Geno.source FROM Geno, Species
+# WHERE Species.Name = '#{species}'
+# AND Geno.Name = '#{marker}'
+#      """
      query = from tab_species in Species,
      join: geno in Geno,
      on: tab_species."SpeciesId" == geno."SpeciesId",
-     where: tab_species."Name" == ^species and geno."Name" == marker,
-     select: {geno."Chr", geno."Mb", tab_species.id, geno.source}
+     where: tab_species."Name" == ^species and geno."Name" == ^marker,
+     select: {geno."Chr", geno."Mb", tab_species.id, geno."Source"}
 
     # {:ok, rows} = DB.query(query)
-    Repo.all(query) |> Enum.map(&(
-      {chr_name,chr_len,species_id,source} = &1
+
+    from_tuple_to_structure = fn(query_result) ->
+      {chr_name,chr_len,species_id,source} = query_result
       %{
         species: species,
         species_id: species_id,

  end

  def menu_species do
    {:ok, rows} = DB.query("SELECT speciesid,name,menuname FROM Species")
    for r <- rows, do: ( {id,name,fullname} = r; [id,name,fullname] )
  end

  def menu_groups(species) do

        chr:     chr_name,
        chr_len: chr_len
      } 
    end

    Repo.all(query) |> Enum.map(from_tuple_to_structure)

    
    # for r <- rows, do: ( {chr_name,chr_len,species_id,source} = r;
