public class SimpleMzIdentMLExporter extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static String |
ANALYSIS_SECTION
Key for the analysis section.
|
static String |
DATA_SECTION
Key for the data section.
|
static String |
HEAD_SECTION
Key for the head section.
|
static int |
MAX_NEUTRAL_LOSSES
The maximum number of neutral losses a fragment ion can have in order to
be annotated.
|
static MzIdentMLVersion |
MZIDENTML_VERSION
The version of the mzIdentML format.
|
static int |
N_AA
The number of amino acids to export before and after the peptide
|
static String |
PEPTIDE_EVIDENCE_SECTION
Key for the peptide evidence section.
|
static String |
PEPTIDE_SECTION
Key for the peptide section.
|
Constructor and Description |
---|
SimpleMzIdentMLExporter(String softwareName,
String softwareVersion,
String softwareUrl,
File tempFolder,
File destinationFile,
ArrayList<File> spectrumFiles,
File searchEngineFile,
HashMap<String,ArrayList<String>> searchEngines,
File fastaFile,
IdentificationParameters identificationParameters,
SequenceProvider sequenceProvider,
ProteinDetailsProvider proteinDetailsProvider,
SpectrumProvider spectrumProvider,
ModificationProvider modificationProvider,
FastaSummary fastaSummary,
String contactFirstName,
String contactLastName,
String contactAddress,
String contactEmail,
String contactOrganizationName,
String contactOrganizationAddress,
String contactOrganizationEmail,
boolean peptideInference)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSpectrum(String spectrumFile,
String spectrumTitle,
ArrayList<PeptideAssumption> peptideAssumptions,
ArrayList<TreeMap<Double,HashMap<Integer,Double>>> modificationLocalizationScores,
PeptideSpectrumAnnotator peptideSpectrumAnnotator)
Adds a peptide-spectrum match to the file.
|
void |
close() |
void |
finalizeFile()
Finalizes the writing of the mzIdentML file.
|
String |
getModificationName(double modMass,
Peptide peptide,
int modSite)
Returns the name of the modification corresponding to he given
modification mass at the given site on the given peptide.
|
static String |
getPeptideEvidenceKey(String accession,
int peptideStart,
long peptideKey)
Returns the peptide evidence key as string for the given peptide
attributes.
|
void |
init(String contactFirstName,
String contactLastName,
String contactAddress,
String contactEmail,
String contactOrganizationName,
String contactOrganizationAddress,
String contactOrganizationEmail)
Initializes the writing of the file.
|
public static final String HEAD_SECTION
public static final String PEPTIDE_SECTION
public static final String PEPTIDE_EVIDENCE_SECTION
public static final String ANALYSIS_SECTION
public static final String DATA_SECTION
public static final MzIdentMLVersion MZIDENTML_VERSION
public static final int MAX_NEUTRAL_LOSSES
public static final int N_AA
public SimpleMzIdentMLExporter(String softwareName, String softwareVersion, String softwareUrl, File tempFolder, File destinationFile, ArrayList<File> spectrumFiles, File searchEngineFile, HashMap<String,ArrayList<String>> searchEngines, File fastaFile, IdentificationParameters identificationParameters, SequenceProvider sequenceProvider, ProteinDetailsProvider proteinDetailsProvider, SpectrumProvider spectrumProvider, ModificationProvider modificationProvider, FastaSummary fastaSummary, String contactFirstName, String contactLastName, String contactAddress, String contactEmail, String contactOrganizationName, String contactOrganizationAddress, String contactOrganizationEmail, boolean peptideInference) throws FileNotFoundException, IOException
softwareName
- The name of the software used to write the mzIdentML
file.softwareVersion
- The version of the software used to write the
mzIdentML file.softwareUrl
- The URL of the software used to write the mzIdentML
file.tempFolder
- The folder to use to write temporary files.destinationFile
- The mzIdentML file to write.spectrumFiles
- The spectrum files.searchEngineFile
- The search engine file used to identify the
spectra.searchEngines
- Map of the search engine(s) and their version used
to identify the spectra.fastaFile
- The fasta file containing the peptide/protein sequences.identificationParameters
- The identification parameters used to
identify the spectra.sequenceProvider
- A sequence provider for the given fasta file.proteinDetailsProvider
- A protein details provider for the given
fasta file.spectrumProvider
- A spectrum provider for the given spectrum file.modificationProvider
- A modification provider.fastaSummary
- A summary for the given fasta file.contactFirstName
- Contact first name.contactLastName
- Contact last name.contactAddress
- Contact address.contactEmail
- Contact email.contactOrganizationName
- Contact organization name.contactOrganizationAddress
- Contact organization address.contactOrganizationEmail
- Contact organization email.peptideInference
- Boolean indicating whether peptide inference was
performed, in which case matching keys will be used for the peptides.FileNotFoundException
- Exception thrown if a file is not found.IOException
- Exception thrown if an error occurred while reading
or writing a file.public void init(String contactFirstName, String contactLastName, String contactAddress, String contactEmail, String contactOrganizationName, String contactOrganizationAddress, String contactOrganizationEmail)
contactFirstName
- Contact first name.contactLastName
- Contact last name.contactAddress
- Contact address.contactEmail
- Contact email.contactOrganizationName
- Contact organization name.contactOrganizationAddress
- Contact organization address.contactOrganizationEmail
- Contact organization email.public void finalizeFile()
public void addSpectrum(String spectrumFile, String spectrumTitle, ArrayList<PeptideAssumption> peptideAssumptions, ArrayList<TreeMap<Double,HashMap<Integer,Double>>> modificationLocalizationScores, PeptideSpectrumAnnotator peptideSpectrumAnnotator)
spectrumFile
- The spectrum file.spectrumTitle
- The spectrum title.peptideAssumptions
- The peptide assumptions for this spectrum.modificationLocalizationScores
- The modification localization
scores for the given peptide assumptions.peptideSpectrumAnnotator
- The annotator to use for the spectra.public static String getPeptideEvidenceKey(String accession, int peptideStart, long peptideKey)
accession
- the protein accessionpeptideStart
- the index of the peptide on the protein sequencepeptideKey
- the peptide match keypublic String getModificationName(double modMass, Peptide peptide, int modSite)
modMass
- The modifification mass.peptide
- The peptide.modSite
- The modification site.public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2021. All rights reserved.