122 unsigned fraction_group = 1;
123 unsigned fraction = 1;
124 std::string path =
"UNKNOWN_FILE";
127 std::string sample_name =
"0";
137 const std::vector< std::vector < std::string > >& content,
138 const std::map< std::string, Size >& sample_to_rowindex,
139 const std::map< std::string, Size >& columnname_to_columnindex
146 void addSample(
const std::string& sample,
const std::vector<std::string>& content = {});
159 std::string
getFactorValue(
const std::string& sample_name,
const std::string &factor)
const;
162 std::string
getFactorValue(
unsigned sample_idx,
const std::string &factor)
const;
180 std::vector< std::vector < std::string > >
content_;
270 unsigned getSample(
unsigned fraction_group,
unsigned label = 1);
A container for consensus elements.
Definition ConsensusMap.h:67
Definition ExperimentalDesign.h:119
MSFileSectionEntry()=default
Definition ExperimentalDesign.h:131
std::map< std::string, Size > sample_to_rowindex_
Definition ExperimentalDesign.h:184
void addSample(const std::string &sample, const std::vector< std::string > &content={})
std::set< std::string > getFactors() const
std::string getSampleName(unsigned sample_row) const
bool hasFactor(const std::string &factor) const
std::map< std::string, Size > columnname_to_columnindex_
Definition ExperimentalDesign.h:188
std::set< std::string > getSamples() const
Size getContentSize() const
returns the number of entries in content_ member
std::vector< std::vector< std::string > > content_
Definition ExperimentalDesign.h:180
std::string getFactorValue(const std::string &sample_name, const std::string &factor) const
std::string getFactorValue(unsigned sample_idx, const std::string &factor) const
unsigned getSampleRow(const std::string &sample) const
Size getFactorColIdx(const std::string &factor) const
SampleSection(const std::vector< std::vector< std::string > > &content, const std::map< std::string, Size > &sample_to_rowindex, const std::map< std::string, Size > &columnname_to_columnindex)
bool hasSample(const std::string &sample) const
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition ExperimentalDesign.h:109
unsigned getNumberOfLabels() const
static void errorIfAlreadyExists(std::set< T > &container, T &item, const std::string &message)
std::map< std::pair< std::string, unsigned >, unsigned > getPathLabelToSampleMapping(bool use_basename_only) const
return <file_path, label> to sample index mapping
Size filterByBasenames(const std::set< std::string > &bns)
unsigned getNumberOfFractions() const
static ExperimentalDesign fromConsensusMap(const ConsensusMap &c)
Extract experimental design from consensus map.
unsigned getSample(unsigned fraction_group, unsigned label=1)
unsigned getNumberOfSamples() const
std::vector< std::vector< std::pair< std::string, unsigned > > > getConditionToPathLabelVector() const
void setSampleSection(const SampleSection &sample_section)
bool sameNrOfMSFilesPerFraction() const
unsigned getNumberOfFractionGroups() const
std::map< std::pair< std::string, unsigned >, unsigned > getPathLabelToPrefractionationMapping(bool use_basename_only) const
std::map< std::vector< std::string >, std::set< unsigned > > getConditionToSampleMapping() const
return a condition (unique combination of sample section values except replicate) to Sample index map...
std::vector< std::string > getFileNames_(bool basename) const
std::map< std::vector< std::string >, std::set< std::string > > getUniqueSampleRowToSampleMapping() const
const MSFileSection & getMSFileSection() const
std::map< std::pair< std::string, unsigned >, unsigned > getPathLabelToConditionMapping(bool use_basename_only) const
void setMSFileSection(const MSFileSection &msfile_section)
std::vector< MSFileSectionEntry > MSFileSection
Definition ExperimentalDesign.h:191
MSFileSection msfile_section_
Definition ExperimentalDesign.h:318
static ExperimentalDesign fromIdentifications(const std::vector< ProteinIdentification > &proteins)
Extract experimental design from identifications.
std::vector< unsigned > getFractions_() const
ExperimentalDesign(const MSFileSection &msfile_section, const SampleSection &sample_section)
std::vector< unsigned > getLabels_() const
std::map< std::pair< std::string, unsigned >, unsigned > getPathLabelToFractionMapping(bool use_basename_only) const
return <file_path, label> to fraction mapping
std::map< std::pair< std::string, unsigned >, unsigned > pathLabelMapper_(bool, unsigned(*f)(const ExperimentalDesign::MSFileSectionEntry &)) const
Generic Mapper (Path, Label) -> f(row)
bool isFractionated() const
std::map< unsigned int, std::vector< std::string > > getFractionToMSFilesMapping() const
return fraction index to file paths (ordered by fraction_group)
std::map< std::string, unsigned > getSampleToPrefractionationMapping() const
static ExperimentalDesign fromFeatureMap(const FeatureMap &f)
Extract experimental design from feature map.
const ExperimentalDesign::SampleSection & getSampleSection() const
std::map< std::pair< std::string, unsigned >, unsigned > getPathLabelToFractionGroupMapping(bool use_basename_only) const
return <file_path, label> to fraction_group mapping
SampleSection sample_section_
Definition ExperimentalDesign.h:319
ExperimentalDesign()=default
std::map< std::string, unsigned > getSampleToConditionMapping() const
unsigned getNumberOfMSFiles() const
A container for features.
Definition FeatureMap.h:78
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19