Documentation
¶
Index ¶
- Variables
- type CVParam
- type DataProcessing
- type MzML
- func (f *MzML) AppendDataProcessing(proc DataProcessing) error
- func (f *MzML) AppendSoftwareInfo(id string, version string) error
- func (f *MzML) Centroid(scanIndex int) (bool, error)
- func (f *MzML) GetPrecursors(scanIndex int) ([]XMLprecursor, error)
- func (f *MzML) IonInjectionTime(scanIndex int) (float64, error)
- func (f *MzML) MSInstruments() ([]string, error)
- func (f *MzML) MSLevel(scanIndex int) (int, error)
- func (f *MzML) NumSpecs() int
- func (f *MzML) ReadScan(scanIndex int) ([]Peak, error)
- func (f *MzML) RetentionTime(scanIndex int) (float64, error)
- func (f *MzML) ScanID(scanIndex int) (string, error)
- func (f *MzML) ScanIndex(scanID string) (int, error)
- func (f *MzML) TotalIonCurrent(scanIndex int) (float64, error)
- func (f *MzML) UpdateScan(scanIndex int, p []Peak, updateMz bool, updateIntens bool) error
- func (f *MzML) Write(writer io.Writer) error
- type Peak
- type ProcessingMethod
- type XMLprecursor
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidScanID means an invalid scan id is supplied ErrInvalidScanID = errors.New("MzML: invalid scan id") // ErrInvalidScanIndex means an invalid scan index is supplied ErrInvalidScanIndex = errors.New("MzML: invalid scan index") // ErrUnknownUnit means the file contains a unit that the software cannot handle ErrUnknownUnit = errors.New("MzML: can't handle unit") // ErrNoInstrumentConfiguration means the file does not contain an instrument configuration ErrNoInstrumentConfiguration = errors.New("MzML: no instrument configuration in file") // ErrNoMzML means the file does not contain mzML content ErrNoMzML = errors.New("MzML: no mzML content in file") )
Functions ¶
This section is empty.
Types ¶
type CVParam ¶ added in v0.99.0
type CVParam struct { Accession string `xml:"accession,attr,omitempty"` Name string `xml:"name,attr,omitempty"` Value string `xml:"value,attr,omitempty"` UnitCvRef string `xml:"unitCvRef,attr,omitempty"` UnitAccession string `xml:"unitAccession,attr,omitempty"` UnitName string `xml:"unitName,attr,omitempty"` }
CVParam contains values and attributes of a mzML Controlled Vocabulary term (http://www.peptideatlas.org/tmp/mzML1.1.0.html)
type DataProcessing ¶ added in v0.99.0
type DataProcessing struct { ID string `xml:"id,attr,omitempty"` ProcessingMeth []ProcessingMethod `xml:"processingMethod"` }
DataProcessing contains info for the correspondingly named tag in mzML
type MzML ¶
type MzML struct {
// contains filtered or unexported fields
}
MzML wraps the contents of the mzML file
func (*MzML) AppendDataProcessing ¶ added in v0.99.0
func (f *MzML) AppendDataProcessing(proc DataProcessing) error
AppendDataProcessing adds info to the DataProcessing tag of the mzML file
func (*MzML) AppendSoftwareInfo ¶
AppendSoftwareInfo adds info to the SoftwareList tag of the mzML file
func (*MzML) GetPrecursors ¶
func (f *MzML) GetPrecursors(scanIndex int) ([]XMLprecursor, error)
GetPrecursors returns the mzML precursors struct for a given scanIndex
func (*MzML) IonInjectionTime ¶ added in v0.99.0
IonInjectionTime returns the ion injection time of a spectrum in ms, or NaN is not found
func (*MzML) MSInstruments ¶
MSInstruments returns the CV terms of the MS instrument
func (*MzML) ReadScan ¶
ReadScan reads a single scan n is the sequence number of the scan in the mzML file, This is not the same as the scan number that is specified in the mzML file! To read a scan using the mzML number, use ReadScan(f, ScanIndex(f, scanNum))
func (*MzML) RetentionTime ¶
RetentionTime returns the retention time of a spectrum
func (*MzML) ScanID ¶
ScanID converts a scan index (used to access the scan data) into a scan id (used in the mzML file)
func (*MzML) ScanIndex ¶
ScanIndex converts a scan identifier (the string used in the mzML file) into an index that is used to access the scans
func (*MzML) TotalIonCurrent ¶ added in v0.99.0
TotalIonCurrent returns the total ion current, or NaN if not found
func (*MzML) UpdateScan ¶
UpdateScan sets the mz/intensity info of a scan
type ProcessingMethod ¶ added in v0.99.0
type ProcessingMethod struct { Count int `xml:"order,attr"` SoftwareRef string `xml:"softwareRef,attr,omitempty"` CvPar []CVParam `xml:"cvParam,omitempty"` UserPar []userParam `xml:"userParam,omitempty"` }
ProcessingMethod contains info for the correspondingly named tag in mzML
type XMLprecursor ¶
type XMLprecursor struct { SpectrumRef string `xml:"spectrumRef,attr,omitempty"` IsolationWindow isolationWindow `xml:"isolationWindow,omitempty"` SelectedIonList selectedIonList `xml:"selectedIonList"` Activation activation `xml:"activation"` }
XMLprecursor contains info for the correspondingly named tag in the mzML file