/** * Build up a list of the protein lengths. * * @param bottomProtein Protein Id to start from * @param topProtein Protein Id to end on * @return Map of values */ private Map<Long, Integer> getProteinSequenceLengths(long bottomProtein, long topProtein) { Map<Long, Integer> proteinLengthMap = new HashMap<Long, Integer>(); List<Protein> proteins = proteinDAO.getProteinsBetweenIds(bottomProtein, topProtein); for (Protein protein : proteins) { proteinLengthMap.put(protein.getId(), protein.getSequenceLength()); } return proteinLengthMap; } }
@SuppressWarnings("unchecked") List<Protein> proteins = proteinQuery.getResultList(); for (Protein protein : proteins) { proteinIdToProteinMap.put(protein.getId().toString(), protein);
@SuppressWarnings("unchecked") List<Protein> proteins = proteinQuery.getResultList(); for (Protein protein : proteins) { proteinIdToProteinMap.put(protein.getId().toString(), protein);
@SuppressWarnings("unchecked") List<Protein> dbProteins = proteinQuery.getResultList(); for (Protein protein : dbProteins) { proteinIdToProteinMap.put(protein.getId().toString(), protein);
@SuppressWarnings("unchecked") List<Protein> proteins = proteinQuery.getResultList(); for (Protein protein : proteins) { proteinIdToProteinMap.put(protein.getId().toString(), protein);
if (protein.getId() == null) { throw new FastaFileWritingException("The FastaFileWriter class can only write out Protein objects that have already been persisted to the database as it uses the database primary key as the protein ID in the fasta file.", filePath); FastaEntryWriter.writeFastaFileEntry(writer, protein.getId().toString(), seq, sequenceLineLength);
LOGGER.trace("Matching protein count: " + matchingProteins.size()); for (Protein protein : matchingProteins) { LOGGER.trace("Protein ID: " + protein.getId() + " MD5: " + protein.getMd5()); LOGGER.trace("Has " + protein.getMatches().size() + " matches"); for (ProteinXref xref : protein.getCrossReferences()) {
Set<ProteinXref> xrefs = newProtein.getCrossReferences(); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Protein with ID " + newProtein.getId() + " has " + xrefs.size() + " cross references.");
Protein protein = proteinIdToProteinMap.get(rp.getProteinIdentifier()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("persist protein: " + protein.getId() + " md5:" + protein.getMd5());
throw new IllegalStateException("Cannot find the ORF object that maps to protein with PK / MD5: " + protein.getId() + " / " + protein.getMd5());
processMatches(protein.getMatches(), proteinIdForGFF, date, protein, getNucleotideId()); } else { throw new IllegalStateException("Cannot find the ORF object that maps to protein with PK / MD5: " + protein.getId() + " / " + protein.getMd5());