SourceFile#
- class pyopenms.SourceFile#
Bases:
CVTermListOpenMS class SourceFile
- __init__() None#
- __init__(arg: pyopenms.SourceFile, /) None
Methods
__init__()addCVTerm(term)Adds a CV term
Removes all meta values
consumeCVTerms(cv_term_map)Merges the given map into the member map, no duplicate checking
empty()Returns all checksum type names known to OpenMS
Returns a copy of the CV terms, keyed by CV accession
Returns the file's checksum
Returns the checksum type
Returns the file size in MB
Returns the file type
getKeys(keys)Overloaded function.
getMetaValue(name)Returns the value corresponding to a string, or DataValue::EMPTY if not found
Returns the file name
Returns the native ID type of the spectra
Returns the nativeID of the spectra
Returns the file path
hasCVTerm(accession)Returns if the MetaInfo is empty
Returns a reference to the MetaInfoRegistry
metaValueExists(name)Returns whether an entry with the given name exists
removeMetaValue(name)Removes the DataValue corresponding to name if it exists
replaceCVTerm(cv_term)Replaces the specified CV term
replaceCVTerms(cv_term_map)setCVTerms(terms)Sets the CV terms from a vector
setChecksum(checksum, type)Sets the file's checksum
setFileSize(file_size)Sets the file size in MB
setFileType(file_type)Sets the file type
setMetaValue(name, value)Sets the DataValue corresponding to a name
setNameOfFile(name_of_file)Sets the file name
setNativeIDType(type)Sets the native ID type of the spectra
setNativeIDTypeAccession(accesssion)Sets the native ID of the spectra
setPathToFile(path_path_to_file)Sets the file path
- class ChecksumType(*values)#
Bases:
EnumType of file checksum
- MD5 = 2#
- SHA1 = 1#
- SIZE_OF_CHECKSUMTYPE = 3#
- UNKNOWN_CHECKSUM = 0#
- getMapping()#
Returns a dict mapping int values to enum member name strings.
- addCVTerm(term: pyopenms.CVTerm) None#
Adds a CV term
- clearMetaInfo() None#
Removes all meta values
- consumeCVTerms(cv_term_map: dict[str, collections.abc.Sequence[pyopenms.CVTerm]]) None#
Merges the given map into the member map, no duplicate checking
- empty() bool#
- static getAllNamesOfChecksumType() list[str]#
Returns all checksum type names known to OpenMS
- getCVTerms() dict[str, list[pyopenms.CVTerm]]#
Returns a copy of the CV terms, keyed by CV accession
- getChecksum() str#
Returns the file’s checksum
- getChecksumType() pyopenms.SourceFile.ChecksumType#
Returns the checksum type
- getFileSize() float#
Returns the file size in MB
- getFileType() str#
Returns the file type
- getKeys(keys: list) None#
- getKeys() list
Overloaded function.
getKeys(keys: list) -> None
Fills the given list with all meta value keys
getKeys() -> list
Returns all meta value keys as a list
- getMetaValue(name: str) None | int | float | str | bytes | list[str] | list[int] | list[float]#
Returns the value corresponding to a string, or DataValue::EMPTY if not found
- getNameOfFile() str#
Returns the file name
- getNativeIDType() str#
Returns the native ID type of the spectra
- getNativeIDTypeAccession() str#
Returns the nativeID of the spectra
- getPathToFile() str#
Returns the file path
- hasCVTerm(accession: str) bool#
- isMetaEmpty() bool#
Returns if the MetaInfo is empty
- static metaRegistry() pyopenms.MetaInfoRegistry#
Returns a reference to the MetaInfoRegistry
- metaValueExists(name: str) bool#
Returns whether an entry with the given name exists
- removeMetaValue(name: str) None#
Removes the DataValue corresponding to name if it exists
- replaceCVTerm(cv_term: pyopenms.CVTerm) None#
Replaces the specified CV term
- replaceCVTerms(cv_term_map: dict[str, collections.abc.Sequence[pyopenms.CVTerm]]) None#
- setCVTerms(terms: collections.abc.Sequence[pyopenms.CVTerm]) None#
Sets the CV terms from a vector
- setChecksum(checksum: str, type: pyopenms.SourceFile.ChecksumType) None#
Sets the file’s checksum
- setFileSize(file_size: float) None#
Sets the file size in MB
- setFileType(file_type: str) None#
Sets the file type
- setMetaValue(name: str, value: None | int | float | str | bytes | list[str] | list[int] | list[float]) None#
Sets the DataValue corresponding to a name
- setNameOfFile(name_of_file: str) None#
Sets the file name
- setNativeIDType(type: str) None#
Sets the native ID type of the spectra
- setNativeIDTypeAccession(accesssion: str) None#
Sets the native ID of the spectra
- setPathToFile(path_path_to_file: str) None#
Sets the file path