Class FileImporter

java.lang.Object
eu.isas.peptideshaker.fileimport.FileImporter

public class FileImporter extends Object
This class is responsible for the import of identifications.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileImporter(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.experiment.identification.peptide_shaker.Metrics metrics, ProjectDetails projectDetails, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.exceptions.ExceptionHandler exceptionHandler)
    Constructor for the importer.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.compomics.util.experiment.identification.protein_inference.FastaMapper
    Returns the fasta mapper.
    com.compomics.util.experiment.biology.genes.GeneMaps
    Returns the gene maps.
    Returns the input map.
    Returns the occurrence of proteins.
    com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider
    Returns the details provider.
    com.compomics.util.experiment.io.biology.protein.SequenceProvider
    Returns the sequence provider.
    int
    Imports the identifications from the files.
    void
    Imports the gene information for this project.
    void
    importPsms(File idFile)
    Imports the PSMs from an identification file.
    void
    importSequences(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingParameters, com.compomics.util.parameters.identification.search.SearchParameters searchParameters, com.compomics.util.experiment.io.biology.protein.FastaParameters fastaParameters, com.compomics.util.parameters.identification.advanced.PeptideVariantsParameters peptideVariantsParameters, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.exceptions.ExceptionHandler exceptionHandler)
    Imports sequences from a FASTA file and sets the sequence provider and protein details provider fields.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileImporter

      public FileImporter(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.experiment.identification.peptide_shaker.Metrics metrics, ProjectDetails projectDetails, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.exceptions.ExceptionHandler exceptionHandler)
      Constructor for the importer.
      Parameters:
      identification - The identification where to store the matches.
      identificationParameters - The identification parameters.
      processingParameters - The processing parameters.
      metrics - The metrics of the data set to be saved.
      projectDetails - The project details.
      spectrumProvider - The spectrum provider.
      waitingHandler - The handler displaying feedback to the user.
      exceptionHandler - The exception handler.
  • Method Details

    • importFiles

      public int importFiles(ArrayList<File> idFiles)
      Imports the identifications from the files.
      Parameters:
      idFiles - the identification files
      Returns:
      0 if success, 1 if not
    • importPsms

      public void importPsms(File idFile) throws IOException, InterruptedException, TimeoutException
      Imports the PSMs from an identification file.
      Parameters:
      idFile - the identification file
      Throws:
      IOException - exception thrown if an error occurred when parsing the file
      InterruptedException - Exception thrown if a thread is interrupted.
      TimeoutException - Exception thrown if the process timed out.
    • importSequences

      public void importSequences(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingParameters, com.compomics.util.parameters.identification.search.SearchParameters searchParameters, com.compomics.util.experiment.io.biology.protein.FastaParameters fastaParameters, com.compomics.util.parameters.identification.advanced.PeptideVariantsParameters peptideVariantsParameters, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.exceptions.ExceptionHandler exceptionHandler) throws IOException
      Imports sequences from a FASTA file and sets the sequence provider and protein details provider fields.
      Parameters:
      sequenceMatchingParameters - the sequence matching parameters
      searchParameters - the search parameters
      fastaParameters - the FASTA parameters
      peptideVariantsParameters - the peptide variants parameters set by the user
      waitingHandler - the handler displaying feedback to the user and allowing canceling the import
      exceptionHandler - handler for exceptions
      Throws:
      IOException - exception thrown if an error occurred while reading the FASTA file
    • importGenes

      public void importGenes()
      Imports the gene information for this project.
    • getGeneMaps

      public com.compomics.util.experiment.biology.genes.GeneMaps getGeneMaps()
      Returns the gene maps.
      Returns:
      the gene maps
    • getSequenceProvider

      public com.compomics.util.experiment.io.biology.protein.SequenceProvider getSequenceProvider()
      Returns the sequence provider.
      Returns:
      the sequence provider
    • getProteinDetailsProvider

      public com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider getProteinDetailsProvider()
      Returns the details provider.
      Returns:
      the details provider
    • getFastaMapper

      public com.compomics.util.experiment.identification.protein_inference.FastaMapper getFastaMapper()
      Returns the fasta mapper.
      Returns:
      the fasta mapper
    • getInputMap

      public InputMap getInputMap()
      Returns the input map.
      Returns:
      the input map
    • getProteinCount

      public HashMap<String,Integer> getProteinCount()
      Returns the occurrence of proteins.
      Returns:
      the occurrence of proteins