Search in sources :

Example 6 with FormalProtein

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;
}
Also used : DBFormalSpecies(cbit.vcell.model.DBFormalSpecies) FormalProtein(cbit.vcell.dictionary.FormalProtein)

Aggregations

FormalProtein (cbit.vcell.dictionary.FormalProtein)6 BoundProtein (cbit.vcell.dictionary.BoundProtein)3 FormalCompound (cbit.vcell.dictionary.FormalCompound)3 ProteinInfo (cbit.vcell.dictionary.ProteinInfo)3 DBFormalSpecies (cbit.vcell.model.DBFormalSpecies)3 KeyValue (org.vcell.util.document.KeyValue)3 BoundCompound (cbit.vcell.dictionary.BoundCompound)2 CompoundInfo (cbit.vcell.dictionary.CompoundInfo)2 Element (org.jdom.Element)2 BoundEnzyme (cbit.vcell.dictionary.BoundEnzyme)1 FormalEnzyme (cbit.vcell.dictionary.FormalEnzyme)1 DBSpecies (cbit.vcell.model.DBSpecies)1 Expression (cbit.vcell.parser.Expression)1 Connection (java.sql.Connection)1 Vector (java.util.Vector)1