Lookup
mzmlpy.lookup.SpectrumLookup
SpectrumLookup(
file_object: FileInterface,
count: int | None = None,
id_regex: str | None = None,
)
Bases: BaseLookup[Spectrum]
Lookup interface for spectra.
Source code in src/mzmlpy/lookup.py
14 15 16 17 18 | |
count
property
count: int | None
Get count of items.
get_by_index
get_by_index(index: int | str) -> T
Get item by index. Negative indices count from the end, like a list.
Source code in src/mzmlpy/lookup.py
39 40 41 42 43 44 45 46 47 48 | |
get_by_id
get_by_id(identifier: str) -> T
Get item by ID.
Source code in src/mzmlpy/lookup.py
50 51 52 | |
get_by_slice
get_by_slice(slice_obj: slice) -> list[T]
Get items by slice notation.
Source code in src/mzmlpy/lookup.py
54 55 56 57 58 59 60 61 62 | |
next
next() -> T
Advance a persistent cursor and return the next item.
The cursor is created on first call and advances on each subsequent call, raising
StopIteration once every item has been returned. Call :meth:reset to start over.
Source code in src/mzmlpy/lookup.py
89 90 91 92 93 94 95 96 97 | |
reset
reset() -> None
Reset the cursor used by :meth:next so the next call starts from the first item.
Source code in src/mzmlpy/lookup.py
99 100 101 | |
mzmlpy.lookup.ChromatogramLookup
ChromatogramLookup(
file_object: FileInterface,
count: int | None = None,
id_regex: str | None = None,
)
Bases: BaseLookup[Chromatogram]
Lookup interface for chromatograms.
Source code in src/mzmlpy/lookup.py
14 15 16 17 18 | |
count
property
count: int | None
Get count of items.
get_by_index
get_by_index(index: int | str) -> T
Get item by index. Negative indices count from the end, like a list.
Source code in src/mzmlpy/lookup.py
39 40 41 42 43 44 45 46 47 48 | |
get_by_id
get_by_id(identifier: str) -> T
Get item by ID.
Source code in src/mzmlpy/lookup.py
50 51 52 | |
get_by_slice
get_by_slice(slice_obj: slice) -> list[T]
Get items by slice notation.
Source code in src/mzmlpy/lookup.py
54 55 56 57 58 59 60 61 62 | |
next
next() -> T
Advance a persistent cursor and return the next item.
The cursor is created on first call and advances on each subsequent call, raising
StopIteration once every item has been returned. Call :meth:reset to start over.
Source code in src/mzmlpy/lookup.py
89 90 91 92 93 94 95 96 97 | |
reset
reset() -> None
Reset the cursor used by :meth:next so the next call starts from the first item.
Source code in src/mzmlpy/lookup.py
99 100 101 | |