final StringBuilder bldr = new StringBuilder();
// Load the pfam resource from the resource index.
Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
ResourceLocation pfResource = resourceIndex.getProteinFamilyResource();
if (pfResource == null || pfResource.getResourceLocation() == null) {
getPhaseConfiguration().setInjectProteinFamilies(false);
stageError("Resource location for protein family is not set in " +
"resource index, disabling protein family expansion.");
markEndStage(bldr);
return pn;
}
if (!withProteinFamilyInjection()) {
bldr.append(PF_INJECTION_DISABLED);
markEndStage(bldr);
stageOutput(bldr.toString());
return pn;
}
String pfLocation = pfResource.getResourceLocation();
File pfamResource = null;
final ResourceType pfamType = fromLocation(pfLocation);
try {
ResolvedResource resolvedResource =
cache.resolveResource(pfamType, pfLocation);