private UniprotEntry CopyEntry() { UniprotEntry newEntry = new UniprotEntry(); DbReferenceType[] dbRefTypes = new DbReferenceType[dbEntries.Keys.Count]; dbEntries.Keys.CopyTo(dbRefTypes, 0); foreach (DbReferenceType refType in dbRefTypes){ string[] dbRefIDs = Get(refType); foreach (string id in dbRefIDs){ newEntry.AddDbEntry(refType.UniprotName, id); foreach (KeyValuePair<string, List<string>> property in dbEntries[refType][id].properties){ foreach (var propertyValue in property.Value){ newEntry.AddDbEntryProperty(refType.UniprotName, id, property.Key, propertyValue); } } } } if (features != null){ foreach (FeatureType type in GetAllFeatureTypes()){ newEntry.AddFeatures(type, GetFeatures(type)); } } foreach (string kword in Keywords){ newEntry.AddKeyword(kword); } newEntry.ProteinFullNames = ProteinFullNames; newEntry.ProteinShortNames = ProteinShortNames; newEntry.ProteinEcNumbers = ProteinEcNumbers; newEntry.Accessions = Accessions; newEntry.GeneNamesAndTypes = GeneNamesAndTypes; newEntry.OrganismNames = OrganismNames; newEntry.UniprotNames = UniprotNames; newEntry.Sequence = Sequence; foreach (string taxId in taxonomyIds){ newEntry.AddTaxonomyId(taxId); } foreach (string hostTaxId in hostTaxonomyIds){ newEntry.AddHostTaxonomyId(hostTaxId); } return newEntry; }
public string[] GetNames(DbReferenceType key) { if (!dbEntries.ContainsKey(key)){ return new string[0]; } UniprotDbReference[] x = dbEntries[key].Values.ToArray(); string[] result = new string[x.Length]; for (int i = 0; i < x.Length; i++){ result[i] = x[i].GetPropertyValues("entry name")[0]; } return result; }
public UniprotDbReference[] GetDbEntries(DbReferenceType key) { return !dbEntries.ContainsKey(key) ? new UniprotDbReference[0] : dbEntries[key].Values.ToArray(); }
public UniprotDbReference[] GetDbEntries(DbReferenceType[] keys) { List<UniprotDbReference> result = new List<UniprotDbReference>(); foreach (DbReferenceType key in keys){ result.AddRange(GetDbEntries(key)); } return result.ToArray(); }
public string[] Get(DbReferenceType[] keys) { List<string> result = new List<string>(); foreach (DbReferenceType key in keys){ result.AddRange(Get(key)); } return result.ToArray(); }
public string[] Get(DbReferenceType key) { return !dbEntries.ContainsKey(key) ? new string[0] : dbEntries[key].Keys.ToArray(); }