A - the annotations of the peaks in the peak listM - the object that holds the meta data, can be the same object as the peak listP - the object that holds the parameters for initialising this mgf writerpublic abstract class AbstractMgfWriter<A extends PeakAnnotation,M,P extends AbstractMgfWriter.Parameters> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractMgfWriter.Parameters |
| Constructor and Description |
|---|
AbstractMgfWriter(Writer writer,
P parameters) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract int[] |
extractChargeList(PeakList peakList,
M metaData) |
protected abstract List<RetentionTime> |
extractRetentionTime(M metaData) |
protected abstract List<ScanNumber> |
extractScanNumbers(M metaData) |
protected abstract String |
extractTitle(M metaData) |
protected void |
writeCharge(PeakList peakList,
M metaData,
Writer writer) |
void |
writeComment(String comment) |
protected void |
writeMs1Header(P parameters,
Writer writer) |
protected void |
writeMs2(PeakList<? extends A> peakList,
M metaData) |
protected void |
writeMs2Header(PeakList peakList,
M metaData,
Writer writer) |
protected void |
writePeakAnnotations(List<? extends A> annotations,
Writer writer)
Subclasses that want to add annotation information to a peak can override this method.
|
protected void |
writePeaks(PeakList<? extends A> peakList,
Writer writer) |
protected void |
writePepmass(PeakList peakList,
Writer writer) |
protected void |
writeRtInSeconds(M metaData,
Writer writer) |
protected void |
writeScans(M metaData,
Writer writer) |
protected void |
writeTitle(M metaData,
Writer writer) |
public AbstractMgfWriter(Writer writer, P parameters) throws IOException
IOExceptionprotected void writeMs1Header(P parameters, Writer writer) throws IOException
IOExceptionpublic void writeComment(String comment) throws IOException
IOExceptionprotected void writeMs2(PeakList<? extends A> peakList, M metaData) throws IOException
IOExceptionprotected void writeMs2Header(PeakList peakList, M metaData, Writer writer) throws IOException
IOExceptionprotected void writeTitle(M metaData, Writer writer) throws IOException
IOExceptionprotected void writePepmass(PeakList peakList, Writer writer) throws IOException
IOExceptionprotected void writeScans(M metaData, Writer writer) throws IOException
IOExceptionprotected abstract List<ScanNumber> extractScanNumbers(M metaData)
protected void writeRtInSeconds(M metaData, Writer writer) throws IOException
IOExceptionprotected abstract List<RetentionTime> extractRetentionTime(M metaData)
protected void writePeaks(PeakList<? extends A> peakList, Writer writer) throws IOException
IOExceptionprotected void writePeakAnnotations(List<? extends A> annotations, Writer writer)
annotations - the annotations for the peak being writtenwriter - the writerprotected void writeCharge(PeakList peakList, M metaData, Writer writer) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2016. All Rights Reserved.