public void process(final Set<RawProtein<PIRSFHmmer2RawMatch>> subfamRawProteins,final Map<String,RawProtein<PIRSFHmmer2RawMatch>> proteinIdToProteinMap,final Map<String,String> subfamToSuperFamMap){
  LOGGER.info("Added sub families to result...");
  for (  RawProtein<PIRSFHmmer2RawMatch> subfamRawProtein : subfamRawProteins) {
    if (isExpectedMatchSize(subfamRawProtein)) {
      final String proteinId=subfamRawProtein.getProteinIdentifier();
      RawProtein<PIRSFHmmer2RawMatch> superfamRawProtein=proteinIdToProteinMap.get(proteinId);
      if (superfamRawProtein != null) {
        List<PIRSFHmmer2RawMatch> subfamRawMatches=new ArrayList<PIRSFHmmer2RawMatch>(subfamRawProtein.getMatches());
        List<PIRSFHmmer2RawMatch> superfamRawMatches=new ArrayList<PIRSFHmmer2RawMatch>(superfamRawProtein.getMatches());
        PIRSFHmmer2RawMatch bestSuperfamMatch=superfamRawMatches.get(0);
        String bestSuperFamModelId=bestSuperfamMatch.getModelId();
        PIRSFHmmer2RawMatch bestSubfamMatch=subfamRawMatches.get(0);
        String parentFamModelId=subfamToSuperFamMap.get(bestSubfamMatch.getModelId());
        if (isChildOfCheck(bestSuperFamModelId,parentFamModelId)) {
          superfamRawProtein.addMatch(bestSubfamMatch);
          proteinIdToProteinMap.put(proteinId,superfamRawProtein);
        }
 else {
          PIRSFHmmer2RawMatch parentFamMatch=rawMatchDAO.getMatchesByModel(parentFamModelId);
          if (parentFamMatch != null) {
            subfamRawProtein.addMatch(parentFamMatch);
            proteinIdToProteinMap.put(proteinId,subfamRawProtein);
          }
 else {
            LOGGER.warn("Missing parent match for best subfamily: " + bestSubfamMatch.getModelId());
          }
        }
      }
 else {
        LOGGER.warn("No super family matches found for protein with ID " + proteinId + "! Ironically found sub family matches.");
      }
    }
  }
}

public void process ( final Set < RawProtein < PIRSFHmmer2RawMatch > > subfamRawProteins , final Map < String , RawProtein < PIRSFHmmer2RawMatch > > proteinIdToProteinMap , final Map < String , String > subfamToSuperFamMap ) { LOGGER . info ( "Added sub families to result..." ) ; for ( RawProtein < PIRSFHmmer2RawMatch > subfamRawProtein : subfamRawProteins ) { if ( isExpectedMatchSize ( subfamRawProtein ) ) { final String proteinId = subfamRawProtein . getProteinIdentifier ( ) ; RawProtein < PIRSFHmmer2RawMatch > superfamRawProtein = proteinIdToProteinMap . get ( proteinId ) ; if ( superfamRawProtein != null ) { List < PIRSFHmmer2RawMatch > subfamRawMatches = new ArrayList < PIRSFHmmer2RawMatch > ( subfamRawProtein . getMatches ( ) ) ; List < PIRSFHmmer2RawMatch > superfamRawMatches = new ArrayList < PIRSFHmmer2RawMatch > ( superfamRawProtein . getMatches ( ) ) ; PIRSFHmmer2RawMatch bestSuperfamMatch = superfamRawMatches . get ( 0 ) ; String bestSuperFamModelId = bestSuperfamMatch . getModelId ( ) ; PIRSFHmmer2RawMatch bestSubfamMatch = subfamRawMatches . get ( 0 ) ; String parentFamModelId = subfamToSuperFamMap . get ( bestSubfamMatch . getModelId ( ) ) ; if ( isChildOfCheck ( bestSuperFamModelId , parentFamModelId ) ) { superfamRawProtein . addMatch ( bestSubfamMatch ) ; proteinIdToProteinMap . put ( proteinId , superfamRawProtein ) ; } else { PIRSFHmmer2RawMatch parentFamMatch = rawMatchDAO . getMatchesByModel ( parentFamModelId ) ; if ( parentFamMatch != null ) { subfamRawProtein . addMatch ( parentFamMatch ) ; proteinIdToProteinMap . put ( proteinId , subfamRawProtein ) ; } else { LOGGER . warn ( "Missing parent match for best subfamily: " + bestSubfamMatch . getModelId ( ) ) ; } } } else { LOGGER . warn ( "No super family matches found for protein with ID " + proteinId + "! Ironically found sub family matches." ) ; } } } }
adds sub families to the result set .
