anchor.diff:                          d.Add(kv.Key,(Dna(kv.Value, true, AllowAmbiguousBases)))
                     Some d
                     )
  -        feats <-  Some(sgd.loadFeatures featsPath)
  -        
  -        let i1 = feats.Value |> Array.mapi (fun i f -> f.sysName,i)
  -        let i2 = feats.Value |> Array.mapi (fun i f -> f.gene,i)
  -        featIndex <- Array.concat [ i1 ; i2 ] |> Seq.filter (fun (x,_) -> x <> "") |> Map.ofSeq |> Some 
  +        let allFeatures = sgd.loadFeatures featsPath
  +
  +        //let featuresByGeneName
  +
  +        let i1 = allFeatures |> Array.map (fun f -> f.sysName, f)
  +        let i2 = allFeatures |> Array.map (fun f -> f.gene, f)
  +        features <-
  +            Array.concat [ i1 ; i2 ]
  +            |> Seq.filter (fun (x, _) -> x <> "")
  +            |> Map.ofSeq
  +            |> Some
       
       member x.get(g:string) =
           ensureLoaded()
  -        match featIndex with
  +        match features with
               | None -> failwith "Access to unloaded GenomeDef"
  -            | Some(fi) -> feats.Value.[fi.[g]]
  +            | Some(feats) ->
  +                match feats |> Map.tryFind g with
  +                | Some f -> f
  +                | None -> failwithf "No feature '%s' found in genome '%s'." g name
   
       /// Return a list of codons to avoid, if this reference genome has them defined.
       member x.GetCodonAvoid() =
  
positive.code:     else
          Map.empty
  
  /// Init genome definition, genes etc
  type GenomeDef(libDir: string, name: string) as this = class
      let mutable fasta = None
      let mutable feats = None
      let mutable featIndex = None
      let mutable suffixTreePath : string option = None
      let mutable suffixTree : SuffixTreeDisk option = None
  
  
negative.code:     /// Return array of all genomic features we have loaded
      member x.GetAllFeats() =
          ensureLoaded()
          features.Value
          |> Map.toSeq
          |> Seq.map snd
          |> Seq.distinct
          |> Array.ofSeq
  
      member x.Dna(errorContext:string,chr:string,l':int<ZeroOffset>,r':int<ZeroOffset>) =
              ensureLoaded()
  