public static List <IAnnotatedGene> Annotate(IEnumerable <string> geneNames, IGeneAnnotationProvider geneAnnotationProvider) { var annotatedGenes = new List <IAnnotatedGene>(); foreach (var geneName in geneNames) { var annotation = geneAnnotationProvider.Annotate(geneName); if (annotation != null) { annotatedGenes.Add(annotation); } } return(annotatedGenes); }
public IEnumerable <string> GetGeneAnnotations() { var geneAnnotations = new List <string>(); foreach (var gene in _affectedGenes.OrderBy(x => x)) { var annotation = _geneAnnotationProvider.Annotate(gene); if (string.IsNullOrEmpty(annotation)) { continue; } geneAnnotations.Add(annotation); } return(geneAnnotations.Count > 0 ? geneAnnotations : null); }