use of org.dash.valid.ars.AntigenRecognitionSiteLoader in project ImmunogeneticDataTools by nmdp-bioinformatics.
the class GLStringUtilities method checkAntigenRecognitionSite.
/**
* @param locus
* @param alleleBuffer
* @param match
* @return
* @throws UnexpectedAlleleException
*/
public static boolean checkAntigenRecognitionSite(String allele, String referenceAllele) {
String matchedValue = convertToProteinLevel(allele);
AntigenRecognitionSiteLoader instance = null;
try {
instance = AntigenRecognitionSiteLoader.getInstance();
} catch (IOException | InvalidFormatException e) {
LOGGER.warning("Could not load ars data.");
e.printStackTrace();
}
HashMap<String, HashSet<String>> arsMap = instance.getArsMap();
if (arsMap.containsKey(referenceAllele)) {
for (String arsCode : arsMap.keySet()) {
if (arsCode.equals(referenceAllele) && arsMap.get(arsCode).contains(matchedValue)) {
return true;
}
}
}
return false;
}
Aggregations