MascotGenericFile#

class pyopenms.MascotGenericFile#

Bases: ProgressLogger

Read/write Mascot generic files (MGF)

__init__() → None#
__init__(arg: pyopenms.MascotGenericFile, /) → None

Methods

__init__()

endProgress([bytes_processed])

Ends the progress display

getDefaults()

Returns a copy of the default parameters

getHTTPPeakListEnclosure(filename)

Enclosing Strings of the peak list body for HTTP submission

getLogType()

Returns the type of progress log being used

getName()

Returns the name

getParameters()

Returns a copy of the parameters

getSubsections()

load(filename, exp)

Load MGF file

nextProgress()

Increment progress by 1 (according to range begin-end)

setLogType(type)

Sets the progress log that should be used.

setName(name)

Sets the name

setParameters(param)

Sets the parameters

setProgress(value)

Sets the current progress

startProgress(begin, end, label)

store(filename, experiment[, compact])

Attributes

CMD = 0#
GUI = 1#
NONE = 2#
endProgress(bytes_processed: int = 0) → None#

Ends the progress display

getDefaults() → pyopenms.Param#

Returns a copy of the default parameters

getHTTPPeakListEnclosure(filename: str) → tuple[str, str]#

Enclosing Strings of the peak list body for HTTP submission

Can be used to embed custom content into HTTP submission (when writing only the MGF header in HTTP format and then adding the peaks (in whatever format, e.g. mzXML) enclosed in this body The filename can later be found in the Mascot response

getLogType() → pyopenms.ProgressLogger.LogType#

Returns the type of progress log being used

getName() → str#

Returns the name

getParameters() → pyopenms.Param#

Returns a copy of the parameters

getSubsections() → list[str]#
load(filename: str, exp: pyopenms.MSExperiment) → None#

Load MGF file

nextProgress() → None#

Increment progress by 1 (according to range begin-end)

setLogType(type: pyopenms.ProgressLogger.LogType) → None#

Sets the progress log that should be used. The default type is NONE!

setName(name: str) → None#

Sets the name

setParameters(param: pyopenms.Param) → None#

Sets the parameters

setProgress(value: int) → None#

Sets the current progress

startProgress(begin: int, end: int, label: str) → None#
store(filename: str, experiment: pyopenms.MSExperiment, compact: bool = False) → None#