Search in sources :

Example 1 with GlClientException

use of org.nmdp.gl.client.GlClientException in project ImmunogeneticDataTools by nmdp-bioinformatics.

the class GLStringUtilities method convertToMug.

public static MultilocusUnphasedGenotype convertToMug(String glString) {
    MultilocusUnphasedGenotype mug = null;
    try {
        // TODO: should use strict but example GL Strings are missing intron
        // variants in some cases (HLA-DQB1*02:02)
        // GlClient glClient = LocalGlClient.createStrict();
        GlClient glClient = LocalGlClient.create();
        mug = glClient.createMultilocusUnphasedGenotype(glString);
    } catch (GlClientException e) {
        LOGGER.severe("Couldn't convert GLString to MultiLocusUnphasedGenotype");
        e.printStackTrace();
    }
    return mug;
}
Also used : MultilocusUnphasedGenotype(org.nmdp.gl.MultilocusUnphasedGenotype) GlClientException(org.nmdp.gl.client.GlClientException) LocalGlClient(org.nmdp.gl.client.local.LocalGlClient) GlClient(org.nmdp.gl.client.GlClient)

Aggregations

MultilocusUnphasedGenotype (org.nmdp.gl.MultilocusUnphasedGenotype)1 GlClient (org.nmdp.gl.client.GlClient)1 GlClientException (org.nmdp.gl.client.GlClientException)1 LocalGlClient (org.nmdp.gl.client.local.LocalGlClient)1