/** * Returns key to use in, for example, HashMap. * TODO - Check if it is the correct decision to make this transient. * * @return Key to use in, for example, HashMap. */ @Transient @XmlTransient public String getKey() { // TODO: Use name, accession or MD5 as model key? return getAccession(); }
private Hmmer3MatchWithSites getMatch(Signature signature, Model model, String modelId, Map<String, Set<T>> matchesByModel, List<E> rawSites) { assert modelId.equals(model.getAccession()); Set<Hmmer3MatchWithSites.Hmmer3LocationWithSites> locations = new HashSet<>(); double score = 0, evalue = 0; for (T m : matchesByModel.get(modelId)) { // Score and evalue should be the same (repeated for each location) score = m.getScore(); evalue = m.getEvalue(); int hmmLength = model.getLength(); locations.add(getLocation(m, rawSites, hmmLength)); } return new Hmmer3MatchWithSites(signature, modelId, score, evalue, locations); }
Signature signature = (Signature) row[0]; Model model = (Model) row[1]; result.put(model.getAccession(), new SignatureModelHolder(signature, model)); modelCount ++; if (result.get(model.getAccession()) == null){ LOGGER.warn("SignatureModelHolder ERROR: model.getAccession(): " + model.getAccession() + " signature: " + signature);