public static IEnumerable <IHashableFeature> GetInPropertySubSeqEnumeration(IHashableFeature regionFeature, bool fromLeft, IEnumerable <IHashableFeature> epitopeSubSeqEnumeration, Pair <NEC, Hla> entity, int littleLength)
 {
     foreach (IHashableFeature epitopeSubSeq in epitopeSubSeqEnumeration)
     {
         string aaSeqFull = (string)((Feature)epitopeSubSeq).Evaluate(entity);
         foreach (string aaSeqLittle in SpecialFunctions.SubstringEnumeration(aaSeqFull, littleLength))
         {
             foreach (List <string> propertyCombination in KmerProperties.EveryPropertyCombination(aaSeqLittle))
             {
                 string     propertySeq = SpecialFunctions.Join(",", propertyCombination);
                 InProperty feature     = InProperty.GetInstance(propertySeq, epitopeSubSeq);
                 Debug.Assert((bool)feature.Evaluate(entity)); // real assert - must only generate true features
                 yield return(feature);
             }
         }
     }
 }
        public static IEnumerable <IHashableFeature> GetPropertySeqInRegionInstance(int k, Pair <NEC, Hla> necAndHla, IHashableFeature regionFeature)
        {
            NEC nec = necAndHla.First;

            string       region   = (string)((Feature)regionFeature).Evaluate(necAndHla);
            Set <string> aaSeqSet = Set <string> .GetInstance(SpecialFunctions.SubstringEnumeration(region, k));

            foreach (string aaSeq in aaSeqSet)
            {
                foreach (List <string> propertyCombination in KmerProperties.EveryPropertyCombination(aaSeq))
                {
                    string     propertySeq = SpecialFunctions.Join(",", propertyCombination);
                    InProperty feature     = InProperty.GetInstance(propertySeq, regionFeature);
                    Debug.Assert((bool)feature.Evaluate(necAndHla)); // real assert - must only generate true features
                    yield return(feature);
                }
            }
        }