22 class ProteinIdentification;
470 unsigned fraction_group = 1;
476 unsigned fraction = 1;
479 std::string path =
"UNKNOWN_FILE";
496 std::string sample_name =
"0";
513 const std::vector< std::vector < std::string > >& content,
514 const std::map< std::string, Size >& sample_to_rowindex,
515 const std::map< std::string, Size >& columnname_to_columnindex
522 void addSample(
const std::string& sample,
const std::vector<std::string>& content = {});
542 std::string
getFactorValue(
const std::string& sample_name,
const std::string &factor)
const;
547 std::string
getFactorValue(
unsigned sample_idx,
const std::string &factor)
const;
569 std::vector< std::vector < std::string > >
content_;
697 unsigned getSample(
unsigned fraction_group,
unsigned label = 1);
A container for consensus elements.
Definition ConsensusMap.h:67
One row of the MS file section: one quantitative channel of one MS file.
Definition ExperimentalDesign.h:463
MSFileSectionEntry()=default
The sample section: one named row per sample, one column per factor.
Definition ExperimentalDesign.h:507
std::map< std::string, Size > sample_to_rowindex_
Definition ExperimentalDesign.h:573
void addSample(const std::string &sample, const std::vector< std::string > &content={})
Add a sample as the last row.
std::set< std::string > getFactors() const
Get set of all factors (column names) defined for the sample section.
std::string getSampleName(unsigned sample_row) const
Returns the name/ID of the sample for a zero-based row index. Not the row index itself.
bool hasFactor(const std::string &factor) const
Checks whether Sample Section has a specific factor (i.e. column name)
std::map< std::string, Size > columnname_to_columnindex_
Definition ExperimentalDesign.h:577
std::set< std::string > getSamples() const
Get set of all sample NAMES (the Sample column values) present in the sample section.
Size getContentSize() const
returns the number of entries in content_ member
std::vector< std::vector< std::string > > content_
Definition ExperimentalDesign.h:569
std::string getFactorValue(const std::string &sample_name, const std::string &factor) const
Returns value of factor for given sample NAME and factor name.
std::string getFactorValue(unsigned sample_idx, const std::string &factor) const
Returns value of factor for given sample ROW INDEX (zero-based) and factor name.
unsigned getSampleRow(const std::string &sample) const
Returns the zero-based row index in the sample section for a sample name/ID.
Size getFactorColIdx(const std::string &factor) const
Returns column index of factor.
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
Checks whether the sample section has a row for a sample name.
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition ExperimentalDesign.h:449
unsigned getNumberOfLabels() const
Highest label index used anywhere in the design.
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
Number of distinct fraction indices used anywhere in the design.
static ExperimentalDesign fromConsensusMap(const ConsensusMap &c)
Extract experimental design from consensus map.
unsigned getSample(unsigned fraction_group, unsigned label=1)
Sample quantified in a given fraction group and label.
std::map< Size, std::string > sampleRowToName_() const
unsigned getNumberOfSamples() const
Number of samples measured (= number of rows in the sample section)
std::vector< std::vector< std::pair< std::string, unsigned > > > getConditionToPathLabelVector() const
void setSampleSection(const SampleSection &sample_section)
bool sameNrOfMSFilesPerFraction() const
unsigned getNumberOfFractionGroups() const
Number of distinct fraction groups.
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 to Sample index mapping
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:580
MSFileSection msfile_section_
Definition ExperimentalDesign.h:768
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
Whether the design is fractionated.
std::map< unsigned int, std::vector< std::string > > getFractionToMSFilesMapping() const
return fraction index to file paths (ordered by fraction_group)
Size annotateColumnHeaders(ConsensusMap &cmap) const
Write this design's fraction structure onto a ConsensusMap's column headers.
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:769
ExperimentalDesign()=default
std::map< std::string, unsigned > getSampleToConditionMapping() const
unsigned getNumberOfMSFiles() const
Number of distinct MS file paths in the design.
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