Package com.infoclinika.mssharing.model.internal.entity

Examples of com.infoclinika.mssharing.model.internal.entity.RawFile


    private S3ObjectReference getS3ReferenceWithIGPerFiles(ExperimentSearch experimentSearch) {
        LOG.info("Started reading isotope groups from db...");
        final List<IsotopeGroupPerFile> igList = isotopeGroupPerFileRepository.findAllByExperimentSearch(experimentSearch);
        final List<IGPerFileWrapper> transformedResults = newLinkedList();
        for (IsotopeGroupPerFile isotopeGroupPerFile : igList) {
            final RawFile file = isotopeGroupPerFile.getSearchRun().getFile();
            final long isotopeGroupId = isotopeGroupPerFile.getId();
            final List<MS2Scan> allByIsotopeGroupPerFile = ms2ScanRepository.findAllByIsotopeGroupPerFile(isotopeGroupPerFile);
            if (allByIsotopeGroupPerFile == null || allByIsotopeGroupPerFile.size() == 0) {
                LOG.warn("Can't find any scan for isotopeGroupPerFile:" + isotopeGroupPerFile.getId());
                continue;
            }
            final MS2Scan ms2Scan = allByIsotopeGroupPerFile.iterator().next();//todo performance!
            final Long peptId = (isotopeGroupPerFile.getPeptide() == null) ? null : isotopeGroupPerFile.getPeptide().getId();
            transformedResults.add(new IGPerFileWrapper(Long.valueOf(file.getProcessedDataID()), ms2Scan.getScanNumber(), peptId, isotopeGroupId));
        }
        LOG.info("Completed reading isotope groups from db...");
        final Gson gson = new GsonBuilder().serializeSpecialFloatingPointValues().create();
        final String s = gson.toJson(transformedResults);
        final File tempFile = FileOperations.createTempFile(proteinInterfererTargetFolder + S3ObjectReference.S3_URL_SEPARATOR + "ProteinInterfererResults-" + System.currentTimeMillis());
View Full Code Here


        return new Function<SequestSearchResultDTO, SearchResult>() {
            @Override
            public SearchResult apply(SequestSearchResultDTO s) {
                final Peptide peptide = persistPeptideBySequence(s.getPeptideSequence());
                final AggregatedProtein aggregatedProtein = getAggregatedProteinByProteins(db, experimentSearch, s.getProteins()); //todo performance!
                final RawFile rawFile = translatedFileToRawFileMap.get(s.getTranslatedFile());
                final SearchRun searchRun = searchRunRepository.findSearchRunByExperimentAndFile(experimentSearch, rawFile);           //todo performance!
                final MS2Scan ms2Scan = ms2ScanRepository.findOneByScanNumber(experimentSearch, rawFile, s.getScanNumber());    //todo performance!
                final IsotopeGroupPerFile ig = ms2Scan.getIsotopeGroupPerFile();
                if (ig.getPeptide() == null) {
                    ig.setPeptide(peptide);
View Full Code Here

TOP

Related Classes of com.infoclinika.mssharing.model.internal.entity.RawFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.