public GeneDatabase(string file) { string[] lines = System.IO.File.ReadAllLines(@file); foreach (string line in lines) { if (line.Contains(">")) { Gene gene = new Gene(line.Replace("\n", string.Empty)); database.Add(gene); } else { database.ElementAt(database.Count() - 1).addGeneSequence(line.Replace("\n", string.Empty)); } } }
private void addGene(Gene gene) { this.database.Add(gene); }