use of eu.isas.peptideshaker.fileimport.FileImporter in project peptide-shaker by compomics.
the class PeptideShaker method importFiles.
/**
* Imports identification results from result files.
*
* @param waitingHandler the handler displaying feedback to the user
* @param idFiles the files to import
* @param spectrumProvider the spectrum provider
* @param identificationParameters identification parameters
* @param projectDetails the project details
* @param processingPreferences the initial processing preferences
* @param exceptionHandler the exception handler
*
* @return 0 if the import went fine, 1 otherwise
*/
public int importFiles(WaitingHandler waitingHandler, ArrayList<File> idFiles, SpectrumProvider spectrumProvider, IdentificationParameters identificationParameters, ProjectDetails projectDetails, ProcessingParameters processingPreferences, ExceptionHandler exceptionHandler) {
projectCreationDuration = new Duration();
projectCreationDuration.start();
waitingHandler.appendReport("Import process for " + projectParameters.getProjectUniqueName(), true, true);
waitingHandler.appendReportEndLine();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss");
String dbName = projectParameters.getProjectUniqueName() + df.format(projectParameters.getCreationTime()) + ".psdb";
objectsDB = new ObjectsDB(PeptideShaker.getMatchesFolder().getAbsolutePath(), dbName);
identification = new Identification(objectsDB);
identification.addObject(ProjectParameters.key, projectParameters);
fileImporter = new FileImporter(identification, identificationParameters, processingPreferences, metrics, projectDetails, spectrumProvider, waitingHandler, exceptionHandler);
int outcome = fileImporter.importFiles(idFiles);
if (outcome == 0) {
geneMaps = fileImporter.getGeneMaps();
sequenceProvider = fileImporter.getSequenceProvider();
proteinDetailsProvider = fileImporter.getProteinDetailsProvider();
inputMap = fileImporter.getInputMap();
proteinCount = fileImporter.getProteinCount();
return 0;
} else {
return 1;
}
}
Aggregations