Package com.infoclinika.common.io.api

Examples of com.infoclinika.common.io.api.S3ObjectReference


        }
    };

    private File downloadMsDaplChartRef(FileReference msDaplChartInfoRef, File targetFile) {
        LOG.info("Downloading the MsDaplChart info file  from " + msDaplChartInfoRef);
        final S3ObjectReference reference = msDaplChartInfoRef.toS3Reference();
        final File file = FileOperations.obtainFromS3(reference, targetFile);
        LOG.info("Download complete for file at " + msDaplChartInfoRef);
        return file;
    }
View Full Code Here


    @Transactional
    private IsotopeGroupMergeResultResponse doIsotopeGroupMerge(long experimentSearchId) throws IOException{
        final ExperimentSearch experimentSearch = experimentSearchRepository.findOne(experimentSearchId);
        final Ms2ProcessorParamsData msParams = experimentSearch.getData().getParams().getMs2ProcessorParams();
        LOG.info("Creating ig merge file and upload...");
        final S3ObjectReference igMergeRequestRef = getS3ReferenceWithIGPerFiles(experimentSearch);
        LOG.info("Sent isotope group merge task");
        changeStatus(experimentSearchId, IN_PROGRESS_ISOTOPE_GROUP_MERGE_STEP);
        final IsotopeGroupMergeResultResponse isotopeGroupMergeResultResponse = webService.isotopeGroupMerge(targetBucket, transformToString(igMergeRequestRef),
                (byte) msParams.getMaxCharge(), msParams.getIsolationWidth());
        LOG.info("Completed isotope group merge task");
View Full Code Here

                    rawFileToConditionMap.put(file.getId(), c.getId());
                    break;
                }
            }
        }
        final S3ObjectReference intensitiesDataCubeItemsRef = dataCubeService.createIntensitiesItemsForDataCube(experimentSearch, rawFileToConditionMap);
        final S3ObjectReference qValuesDataCubeItemsRef = dataCubeService.createQValueItemsForDataCube(results, rawFileToConditionMap);
        final S3ObjectReference coverageDataCubeItemsRef = dataCubeService.createCoverageItemsForDataCube(pdToStatisticsMap, rawFileToConditionMap);

        final SequestSearchCreatingDataCubeResponse response = webService.createDataCubesForSequestSearch(
                transformToString(intensitiesDataCubeItemsRef), transformToString(qValuesDataCubeItemsRef), transformToString(coverageDataCubeItemsRef));

        experimentSearch.setIntensitiesGroupDataCubeRef(response.intensitiesDataCubeRef);
View Full Code Here

        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());
        try {
            FileUtils.writeStringToFile(tempFile, s);
            final S3ObjectReference reference = new S3ObjectReference(targetBucket, tempFile.getName());
            FileOperations.uploadToS3(tempFile, reference.getBucket(), reference.getKey());
            return reference;
        } catch (IOException e) {
            LOG.error("Can't write ProteinInterfererResults to File");
            LOG.error(e.getMessage(), e);
            return null;
View Full Code Here

        }
        return peptide;
    }

    void persistProteinDescriptionsByDatabase(final SearchDatabase db) {
        final S3ObjectReference referenceToDB = new S3ObjectReference(targetBucket, sequestSearchDbsFolder + StorageService.DELIMITER + db.getFileName());
        LOG.info("Downloading the fasta DB file  from " + referenceToDB);
        final File tempFile = FileOperations.createTempFile();
        if (!tempFile.exists()){
            LOG.info("Can't create temp file" + tempFile);
        }
View Full Code Here

        final Gson gson = new GsonBuilder().serializeSpecialFloatingPointValues().create();
        final String s = gson.toJson(intensitiesItems);
        final File tempFile = FileOperations.createTempFile(name + "-" + System.currentTimeMillis());
        try {
            FileUtils.writeStringToFile(tempFile, s);
            final S3ObjectReference reference = new S3ObjectReference(targetBucket, dataCubeTargetFolder + S3ObjectReference.S3_URL_SEPARATOR + tempFile.getName());
            FileOperations.uploadToS3(tempFile, reference.getBucket(), reference.getKey());
            return reference;
        } catch (IOException e) {
            LOG.error("Can't write List of DataCubeIntensities to File");
            LOG.error(e.getMessage(), e);
            return null;
View Full Code Here

    public void setKey(String key) {
        this.key = key;
    }

    public S3ObjectReference toS3Reference() {
        return new S3ObjectReference(bucket, key);
    }
View Full Code Here

TOP

Related Classes of com.infoclinika.common.io.api.S3ObjectReference

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.