public class Ms2Query extends Object implements Spectrum
Constructor and Description |
---|
Ms2Query(boolean disableCommentSupport)
Default constructor generating an empty Ms2Query
|
Ms2Query(String mgfQuery,
int index,
boolean disableCommentSupport,
boolean ignoreWrongPeaks)
Generates a Ms2Query from a mgf part representing an Ms2Query (including "BEGIN IONS" and "END IONS")
|
Modifier and Type | Method and Description |
---|---|
void |
addErrorTag(String errorTolerantTag)
Adds an error tolerant tag.
|
void |
addETag(String errorTolerantTag)
Adds an error tolerant tag.
|
void |
addPeak(Double mz,
Double intensity)
Adds a peak to the spectrum.
|
void |
addSequenceQualifier(String sequenceQualifier)
Ads a sequence qualifier.
|
void |
addTag(String tag)
Adds a tag.
|
Collection<? extends Param> |
getAdditional()
Get Attributes as
CvParam |
String |
getChargeState() |
String |
getComposition() |
List<String> |
getErrorTolerantTags() |
String |
getId()
Gets the ID.
|
Long |
getIndex()
Internal Spectrum in the corresponding file MGF or mzXML or mzML, starting from 1, incrementing by one for each consecutive spectrum.
|
String |
getInstrument() |
Integer |
getMsLevel()
Returns the msLevel of the spectrum.
|
Map<Double,Double> |
getPeakList()
Returns the spectrum's peak list as
a HashMap with the m/z values as keys
and the corresponding intensities as
values.
|
Double |
getPeptideIntensity() |
Double |
getPeptideMass() |
Integer |
getPrecursorCharge()
Gets the precursor charge.
|
Double |
getPrecursorIntensity()
Returns the precursor's intensity
or null in case it it not available.
|
Double |
getPrecursorMZ()
Returns the precursor's m/z or
null in case the precursor's m/z
is not available.
|
String |
getRetentionTime() |
String |
getScan() |
List<String> |
getSequenceQualifiers() |
List<String> |
getTags() |
String |
getTitle() |
Double |
getTolerance() |
MgfUtils.PeptideToleranceUnit |
getToleranceUnit() |
Map<Integer,String> |
getUserTags() |
String |
getVariableModifications() |
void |
saveAttribute(String name,
String value)
Stores the attribute in the respective member variable.
|
void |
setChargeState(String chargeState) |
void |
setComposition(String composition) |
void |
setErrorTolerantTags(List<String> errorTolerantTags) |
void |
setIndex(long index) |
void |
setInstrument(String instrument) |
void |
setPeakList(Map<Double,Double> peakList) |
void |
setPeptideIntensity(Double peptideIntensity) |
void |
setPeptideMass(Double peptideMass) |
void |
setRetentionTime(String retentionTime) |
void |
setScan(String scan) |
void |
setSequenceQualifiers(List<String> sequenceQualifiers) |
void |
setTags(List<String> tags) |
void |
setTitle(String title) |
void |
setTolerance(Double tolerance) |
void |
setToleranceUnit(MgfUtils.PeptideToleranceUnit toleranceUnit) |
void |
setUserTags(Map<Integer,String> userTags) |
void |
setVariableModifications(String variableModifications) |
String |
toString()
Compiles all the information from this Ms2Query object.
|
public Ms2Query(boolean disableCommentSupport)
public Ms2Query(String mgfQuery, int index, boolean disableCommentSupport, boolean ignoreWrongPeaks) throws PgatkIOException
mgfQuery
- the mgf part to parseindex
- RAW Original scan NumberdisableCommentSupport
- true to disable comment support, false otherwisePgatkIOException
- any problems parsing the mgf partpublic void saveAttribute(String name, String value)
name
- The attribute's namevalue
- The attribute's valuePgatkIOException
- any problems saving the attributepublic void addPeak(Double mz, Double intensity)
mz
- the mz valueintensity
- the intensity valuepublic void addSequenceQualifier(String sequenceQualifier)
sequenceQualifier
- the sequence qualifier to put.public void addTag(String tag)
tag
- the tag to put.public void addETag(String errorTolerantTag)
errorTolerantTag
- the error tolerant tagpublic void addErrorTag(String errorTolerantTag)
errorTolerantTag
- the error tolerant tagpublic String getTitle()
public void setTitle(String title)
public String getChargeState()
public void setChargeState(String chargeState)
public Double getTolerance()
public void setTolerance(Double tolerance)
public MgfUtils.PeptideToleranceUnit getToleranceUnit()
public void setToleranceUnit(MgfUtils.PeptideToleranceUnit toleranceUnit)
public String getComposition()
public void setComposition(String composition)
public String getRetentionTime()
public void setRetentionTime(String retentionTime)
public String getInstrument()
public void setInstrument(String instrument)
public String getScan()
public void setScan(String scan)
public String getVariableModifications()
public void setVariableModifications(String variableModifications)
public Map<Double,Double> getPeakList()
Spectrum
getPeakList
in interface Spectrum
public Double getPeptideMass()
public void setPeptideMass(Double peptideMass)
public Double getPeptideIntensity()
public void setPeptideIntensity(Double peptideIntensity)
public String toString()
public Long getIndex()
Spectrum
public String getId()
public void setIndex(long index)
public Integer getPrecursorCharge()
getPrecursorCharge
in interface Spectrum
public Double getPrecursorMZ()
Spectrum
getPrecursorMZ
in interface Spectrum
public Double getPrecursorIntensity()
Spectrum
getPrecursorIntensity
in interface Spectrum
public Integer getMsLevel()
Spectrum
getMsLevel
in interface Spectrum
public Collection<? extends Param> getAdditional()
CvParam
getAdditional
in interface Spectrum
Copyright © 2021. All rights reserved.