Sample#
- class pyopenms.Sample#
Bases:
object
Cython implementation of _Sample
- Original C++ documentation is available here
– Inherits from [‘MetaInfoInterface’]
Methods
Overload:
clearMetaInfo
(self)Removes all meta values
countTreatments
(self)Returns the number of sample treatments
getComment
(self)Returns the comment (default "")
getConcentration
(self)Returns the concentration (in g/l) (default 0.0)
getKeys
(self, keys)Fills the given vector with a list of all keys for which a value is set
getMass
(self)Returns the mass (in gram) (default 0.0)
getMetaValue
(self, in_0)Returns the value corresponding to a string, or
getName
(self)getNumber
(self)Returns the sample number
getOrganism
(self)getState
(self)Returns the state of aggregation (default SAMPLENULL)
getSubsamples
(self)Returns a reference to the vector of subsamples that were combined to create this sample
getVolume
(self)Returns the volume (in ml) (default 0.0)
isMetaEmpty
(self)Returns if the MetaInfo is empty
metaRegistry
(self)Returns a reference to the MetaInfoRegistry
metaValueExists
(self, in_0)Returns whether an entry with the given name exists
removeMetaValue
(self, in_0)Removes the DataValue corresponding to name if it exists
removeTreatment
(self, position)Brief removes the sample treatment at the given position
setComment
(self, comment)Sets the comment (may contain newline characters)
setConcentration
(self, concentration)Sets the concentration (in g/l)
setMass
(self, mass)Sets the mass (in gram)
setMetaValue
(self, in_0, in_1)Sets the DataValue corresponding to a name
setName
(self, name)setNumber
(self, number)Sets the sample number (e.g.
setOrganism
(self, organism)setState
(self, state)Sets the state of aggregation
setSubsamples
(self, subsamples)Sets the vector of subsamples that were combined to create this sample
setVolume
(self, volume)Sets the volume (in ml)
- SampleState#
alias of
__SampleState
- clearMetaInfo(self) None #
Removes all meta values
- countTreatments(self) int #
Returns the number of sample treatments
- getConcentration(self) float #
Returns the concentration (in g/l) (default 0.0)
- getKeys(self, keys: List[bytes]) None #
Fills the given vector with a list of all keys for which a value is set
- getMass(self) float #
Returns the mass (in gram) (default 0.0)
- getMetaValue(self, in_0: bytes | str | String) int | float | bytes | str | List[int] | List[float] | List[bytes] #
Returns the value corresponding to a string, or
- getState(self) int #
Returns the state of aggregation (default SAMPLENULL)
- getSubsamples(self) List[Sample] #
Returns a reference to the vector of subsamples that were combined to create this sample
- getVolume(self) float #
Returns the volume (in ml) (default 0.0)
- isMetaEmpty(self) bool #
Returns if the MetaInfo is empty
- metaRegistry(self) MetaInfoRegistry #
Returns a reference to the MetaInfoRegistry
- metaValueExists(self, in_0: bytes | str | String) bool #
Returns whether an entry with the given name exists
- removeMetaValue(self, in_0: bytes | str | String) None #
Removes the DataValue corresponding to name if it exists
- removeTreatment(self, position: int) None #
Brief removes the sample treatment at the given position
- setComment(self, comment: bytes | str | String) None #
Sets the comment (may contain newline characters)
- setConcentration(self, concentration: float) None #
Sets the concentration (in g/l)
- setMass(self, mass: float) None #
Sets the mass (in gram)
- setMetaValue(self, in_0: bytes | str | String, in_1: int | float | bytes | str | List[int] | List[float] | List[bytes]) None #
Sets the DataValue corresponding to a name
- setState(self, state: int) None #
Sets the state of aggregation
- setSubsamples(self, subsamples: List[Sample]) None #
Sets the vector of subsamples that were combined to create this sample
- setVolume(self, volume: float) None #
Sets the volume (in ml)