Sample

class pyopenms.Sample

Bases: object

Cython implementation of _Sample

Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1Sample.html

– Inherits from [‘MetaInfoInterface’]

__init__()
  • Cython signature: void Sample()

  • Cython signature: void Sample(Sample &)

Methods

__init__

  • Cython signature: void Sample()

clearMetaInfo

Cython signature: void clearMetaInfo() Removes all meta values

countTreatments

Cython signature: int countTreatments() Returns the number of sample treatments

getComment

Cython signature: String getComment() Returns the comment (default "")

getConcentration

Cython signature: double getConcentration() Returns the concentration (in g/l) (default 0.0)

getKeys

Cython signature: void getKeys(libcpp_vector[String] & keys) Fills the given vector with a list of all keys for which a value is set

getMass

Cython signature: double getMass() Returns the mass (in gram) (default 0.0)

getMetaValue

Cython signature: DataValue getMetaValue(String) Returns the value corresponding to a string, or

getName

Cython signature: String getName()

getNumber

Cython signature: String getNumber() Returns the sample number

getOrganism

Cython signature: String getOrganism()

getState

Cython signature: SampleState getState() Returns the state of aggregation (default SAMPLENULL)

getSubsamples

Cython signature: libcpp_vector[Sample] getSubsamples() Returns a reference to the vector of subsamples that were combined to create this sample

getVolume

Cython signature: double getVolume() Returns the volume (in ml) (default 0.0)

isMetaEmpty

Cython signature: bool isMetaEmpty() Returns if the MetaInfo is empty

metaRegistry

Cython signature: MetaInfoRegistry metaRegistry() Returns a reference to the MetaInfoRegistry

metaValueExists

Cython signature: bool metaValueExists(String) Returns whether an entry with the given name exists

removeMetaValue

Cython signature: void removeMetaValue(String) Removes the DataValue corresponding to name if it exists

removeTreatment

Cython signature: void removeTreatment(unsigned int position) Brief removes the sample treatment at the given position

setComment

Cython signature: void setComment(String comment) Sets the comment (may contain newline characters)

setConcentration

Cython signature: void setConcentration(double concentration) Sets the concentration (in g/l)

setMass

Cython signature: void setMass(double mass) Sets the mass (in gram)

setMetaValue

Cython signature: void setMetaValue(String, DataValue) Sets the DataValue corresponding to a name

setName

Cython signature: void setName(String name)

setNumber

Cython signature: void setNumber(String number) Sets the sample number (e.g.

setOrganism

Cython signature: void setOrganism(String organism)

setState

Cython signature: void setState(SampleState state) Sets the state of aggregation

setSubsamples

Cython signature: void setSubsamples(libcpp_vector[Sample] subsamples) Sets the vector of subsamples that were combined to create this sample

setVolume

Cython signature: void setVolume(double volume) Sets the volume (in ml)

SampleState

alias of pyopenms.pyopenms_2.__SampleState

clearMetaInfo()

Cython signature: void clearMetaInfo() Removes all meta values

countTreatments()

Cython signature: int countTreatments() Returns the number of sample treatments

getComment()

Cython signature: String getComment() Returns the comment (default “”)

getConcentration()

Cython signature: double getConcentration() Returns the concentration (in g/l) (default 0.0)

getKeys()

Cython signature: void getKeys(libcpp_vector[String] & keys) Fills the given vector with a list of all keys for which a value is set

getMass()

Cython signature: double getMass() Returns the mass (in gram) (default 0.0)

getMetaValue()

Cython signature: DataValue getMetaValue(String) Returns the value corresponding to a string, or

getName()

Cython signature: String getName()

getNumber()

Cython signature: String getNumber() Returns the sample number

getOrganism()

Cython signature: String getOrganism()

getState()

Cython signature: SampleState getState() Returns the state of aggregation (default SAMPLENULL)

getSubsamples()

Cython signature: libcpp_vector[Sample] getSubsamples() Returns a reference to the vector of subsamples that were combined to create this sample

getVolume()

Cython signature: double getVolume() Returns the volume (in ml) (default 0.0)

isMetaEmpty()

Cython signature: bool isMetaEmpty() Returns if the MetaInfo is empty

metaRegistry()

Cython signature: MetaInfoRegistry metaRegistry() Returns a reference to the MetaInfoRegistry

metaValueExists()

Cython signature: bool metaValueExists(String) Returns whether an entry with the given name exists

removeMetaValue()

Cython signature: void removeMetaValue(String) Removes the DataValue corresponding to name if it exists

removeTreatment()

Cython signature: void removeTreatment(unsigned int position) Brief removes the sample treatment at the given position

setComment()

Cython signature: void setComment(String comment) Sets the comment (may contain newline characters)

setConcentration()

Cython signature: void setConcentration(double concentration) Sets the concentration (in g/l)

setMass()

Cython signature: void setMass(double mass) Sets the mass (in gram)

setMetaValue()

Cython signature: void setMetaValue(String, DataValue) Sets the DataValue corresponding to a name

setName()

Cython signature: void setName(String name)

setNumber()

Cython signature: void setNumber(String number) Sets the sample number (e.g. sample ID)

setOrganism()

Cython signature: void setOrganism(String organism)

setState()

Cython signature: void setState(SampleState state) Sets the state of aggregation

setSubsamples()

Cython signature: void setSubsamples(libcpp_vector[Sample] subsamples) Sets the vector of subsamples that were combined to create this sample

setVolume()

Cython signature: void setVolume(double volume) Sets the volume (in ml)