use of cbit.vcell.dictionary.FormalProtein in project vcell by virtualcell.
the class DictionaryDbDriver method getProteinFromSwissProtID.
/**
* Returns the protein referenced by the given SwissProt Accession Number
* @return Protein
* @param con Connection
* @param swissProtID String
*/
public FormalProtein getProteinFromSwissProtID(Connection con, String swissProtID) throws SQLException {
FormalProtein result = null;
DBFormalSpecies[] dbfsArr = getDatabaseSpecies(con, null, swissProtID, false, FormalSpeciesType.protein, FormalSpeciesType.PROTEIN_SWISSPROTID, -1, false);
if (dbfsArr != null && dbfsArr.length > 0) {
result = (FormalProtein) dbfsArr[0];
} else {
throw new RuntimeException("Expecting only 1 result");
}
return result;
}
Aggregations