public class PSExportFactory extends Object implements com.compomics.util.io.export.ExportFactory
| Modifier and Type | Method and Description |
|---|---|
void |
addExportScheme(com.compomics.util.io.export.ExportScheme exportScheme) |
String |
getCommandLineOptions()
Returns the list of implemented reports as command line option.
|
static String |
getDefaultDocumentation(String exportName)
Returns the default file name for the export of the documentation of the
given report export type.
|
static com.compomics.util.io.export.ExportScheme |
getDefaultExportScheme(String schemeName)
Returns the desired default export scheme.
|
static String[] |
getDefaultExportSchemesNames()
Returns a list of the default export schemes.
|
static String |
getDefaultReportName(String experiment,
String exportName)
Returns the default file name for the export of a report based on the
project details
|
ArrayList<com.compomics.util.io.export.ExportFeature> |
getExportFeatures(String sectionName,
boolean includeSubFeatures) |
com.compomics.util.io.export.ExportScheme |
getExportScheme(String schemeName) |
String |
getExportTypeFromCommandLineOption(int commandLine)
Returns the export type based on the number used in command line.
|
ArrayList<String> |
getImplementedSections() |
static PSExportFactory |
getInstance()
Static method to get the instance of the factory.
|
static String |
getJsonFile()
Returns the file where to save the implemented export schemes.
|
static String |
getJsonFolder()
Returns the folder where to save the implemented export schemes.
|
ArrayList<String> |
getUserSchemesNames()
Returns a list of the name of the available user schemes.
|
static PSExportFactory |
loadFromFile(File file)
Loads an export factory from a file.
|
void |
removeExportScheme(String schemeName) |
static void |
saveFactory(PSExportFactory psExportFactory)
Saves the factory in the user folder.
|
static void |
setJsonFolder(String serializationFolder)
Sets the file where to save the implemented export schemes.
|
static void |
writeDocumentation(com.compomics.util.io.export.ExportScheme exportScheme,
com.compomics.util.io.export.ExportFormat exportFormat,
File destinationFile)
Writes the documentation related to a report.
|
static void |
writeExport(com.compomics.util.io.export.ExportScheme exportScheme,
File destinationFile,
com.compomics.util.io.export.ExportFormat exportFormat,
boolean gzip,
String experiment,
ProjectDetails projectDetails,
com.compomics.util.experiment.identification.Identification identification,
com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator,
com.compomics.util.experiment.biology.genes.GeneMaps geneMaps,
long[] proteinKeys,
long[] peptideKeys,
long[] psmKeys,
int nSurroundingAA,
com.compomics.util.parameters.identification.IdentificationParameters identificationParameters,
com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider,
com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider,
com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider,
com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters spectrumCountingPreferences,
com.compomics.util.waiting.WaitingHandler waitingHandler)
Writes the desired export in text format.
|
public static PSExportFactory getInstance()
public static void saveFactory(PSExportFactory psExportFactory) throws IOException
psExportFactory - the instance of the factory to saveIOException - exception thrown whenever an error occurred while
saving the PSExportFactorypublic static PSExportFactory loadFromFile(File file) throws IOException
file - the file to loadIOException - exception thrown whenever an error occurred while
loading the filepublic ArrayList<String> getUserSchemesNames()
public static com.compomics.util.io.export.ExportScheme getDefaultExportScheme(String schemeName)
schemeName - the name of the default export schemepublic com.compomics.util.io.export.ExportScheme getExportScheme(String schemeName)
getExportScheme in interface com.compomics.util.io.export.ExportFactorypublic void removeExportScheme(String schemeName)
removeExportScheme in interface com.compomics.util.io.export.ExportFactorypublic void addExportScheme(com.compomics.util.io.export.ExportScheme exportScheme)
addExportScheme in interface com.compomics.util.io.export.ExportFactorypublic ArrayList<String> getImplementedSections()
getImplementedSections in interface com.compomics.util.io.export.ExportFactorypublic ArrayList<com.compomics.util.io.export.ExportFeature> getExportFeatures(String sectionName, boolean includeSubFeatures)
getExportFeatures in interface com.compomics.util.io.export.ExportFactorypublic static String[] getDefaultExportSchemesNames()
public static void writeExport(com.compomics.util.io.export.ExportScheme exportScheme,
File destinationFile,
com.compomics.util.io.export.ExportFormat exportFormat,
boolean gzip,
String experiment,
ProjectDetails projectDetails,
com.compomics.util.experiment.identification.Identification identification,
com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator,
com.compomics.util.experiment.biology.genes.GeneMaps geneMaps,
long[] proteinKeys,
long[] peptideKeys,
long[] psmKeys,
int nSurroundingAA,
com.compomics.util.parameters.identification.IdentificationParameters identificationParameters,
com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider,
com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider,
com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider,
com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters spectrumCountingPreferences,
com.compomics.util.waiting.WaitingHandler waitingHandler)
throws IOException
exportScheme - the scheme of the exportdestinationFile - the destination fileexportFormat - the format of export to usegzip - if true export text as gzipped fileexperiment - the experiment corresponding to this project (mandatory
for the Project section)projectDetails - the project details (mandatory for the Project
section)identification - the identification (mandatory for the Protein,
Peptide and PSM sections)identificationFeaturesGenerator - the identification features
generator (mandatory for the Protein, Peptide and PSM sections)geneMaps - the gene mapsproteinKeys - the protein keys to export (mandatory for the Protein
section)peptideKeys - the peptide keys to export (mandatory for the Peptide
section)psmKeys - the keys of the PSMs to export (mandatory for the PSM
section)nSurroundingAA - the number of surrounding amino acids to export
(mandatory for the Peptide section)identificationParameters - the identification parameterssequenceProvider - a provider for the protein sequencesproteinDetailsProvider - the protein details providerspectrumProvider - the spectrum providerspectrumCountingPreferences - the spectrum counting preferences
(mandatory for the spectrum counting section)waitingHandler - the waiting handlerIOException - exception thrown whenever an IO exception occurred
while reading or writing to a filepublic static void writeDocumentation(com.compomics.util.io.export.ExportScheme exportScheme,
com.compomics.util.io.export.ExportFormat exportFormat,
File destinationFile)
throws IOException
exportScheme - the export scheme of the reportexportFormat - the export format chosen by the userdestinationFile - the destination file where to write the
documentationIOException - thrown if an IOException occurspublic String getCommandLineOptions()
public static String getDefaultReportName(String experiment, String exportName)
experiment - the experiment of the projectexportName - the name of the report typepublic static String getDefaultDocumentation(String exportName)
exportName - the export namepublic String getExportTypeFromCommandLineOption(int commandLine)
commandLine - the number used in command line option. See
getCommandLineOptions().public static String getJsonFile()
public static String getJsonFolder()
public static void setJsonFolder(String serializationFolder)
serializationFolder - the folder where to save the implemented
export schemesCopyright © 2021. All rights reserved.