mzxml

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidScanID    = errors.New("mzxml: invalid scan id")
	ErrInvalidScanIndex = errors.New("mzxml: invalid scan index")
	ErrInvalidFormat    = errors.New("mzxml: invalid data format")
)

Functions

This section is empty.

Types

type MzXML

type MzXML struct {
	// contains filtered or unexported fields
}

func (*MzXML) Centroid

func (f *MzXML) Centroid(scanIndex int64) (bool, error)

Centroid returns true is the spectrum contains centroid peaks In mzXML, centroided applied to the whole file, not individual spectra. For compatibility with mzML, we keep the same interface

func (*MzXML) MSLevel

func (f *MzXML) MSLevel(scanIndex int64) (int, error)

MSLevel returns the MS Level of a spectrum If no MS level is present, return 0

func (*MzXML) NumSpecs

func (f *MzXML) NumSpecs() int64

NumSpecs returns the number of spectra

func (*MzXML) Read

func (f *MzXML) Read(reader io.Reader) error

func (*MzXML) ReadScan

func (f *MzXML) ReadScan(scanIndex int64) ([]Peak, error)

ReadScan reads a single scan n is the sequence number of the scan in the mzXML file, This is not the same as the scan number that is specified in the mzMXL file! To read a scan using the mzXML number, use ReadScan(f, ScanIndex(f, scanNum))

func (*MzXML) RetentionTime

func (f *MzXML) RetentionTime(scanIndex int64) (float64, error)

RetentionTime returns the retention time of a spectrum If no retention time is present, return -1

func (*MzXML) ScanID

func (f *MzXML) ScanID(scanIndex int64) (int64, error)

ScanID converts a scan index (used to access the scan data) into a scan id (used in the mzxml file)

func (*MzXML) ScanIndex

func (f *MzXML) ScanIndex(scanID int64) (int64, error)

ScanIndex converts a scan identifier (the number used in the mzXML file) into an index that is used to access the scans

func (*MzXML) Write

func (mzXML *MzXML) Write(w io.Writer) error

type Peak

type Peak struct {
	Mz     float64
	Intens float64
}

Peak contains the actual ms peak info

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL