@@ -189,6 +189,56 @@ search engine can be when built with the high-level helpers in
189189` openms_python ` . Reuse the test as inspiration for bespoke pipelines or as a
190190regression harness when experimenting with search-related utilities.
191191
192+ ## Experimental design support
193+
194+ Managing multi-sample, multi-fraction experiments? The ` Py_ExperimentalDesign `
195+ wrapper makes it straightforward to work with OpenMS experimental design files
196+ that describe sample layouts, fractionation schemes, and labeling strategies.
197+ ` tests/test_py_experimentaldesign.py ` provides comprehensive examples of loading
198+ and querying experimental designs, including support for fractionated workflows,
199+ label-free and labeled quantitation setups, and integration with feature maps,
200+ consensus maps, and identification results. The wrapper exposes Pythonic
201+ properties for quick access to sample counts, fraction information, and design
202+ summaries—perfect for building sample-aware quantitation pipelines or validating
203+ experimental metadata before analysis.
204+
205+ ``` python
206+ from openms_python import Py_ExperimentalDesign
207+ import pandas as pd
208+
209+ # Load an experimental design from a TSV file
210+ design = Py_ExperimentalDesign.from_file(" design.tsv" )
211+
212+ # Quick access to design properties
213+ print (f " Samples: { design.n_samples} " )
214+ print (f " MS files: { design.n_ms_files} " )
215+ print (f " Fractionated: { design.is_fractionated} " )
216+
217+ # Get a summary
218+ design.print_summary()
219+
220+ # Convert to pandas DataFrame for analysis
221+ df = design.to_dataframe()
222+
223+ # Create from a pandas DataFrame
224+ df = pd.DataFrame({
225+ ' Fraction_Group' : [1 , 1 , 2 , 2 ],
226+ ' Fraction' : [1 , 2 , 1 , 2 ],
227+ ' Spectra_Filepath' : [' f1.mzML' , ' f2.mzML' , ' f3.mzML' , ' f4.mzML' ],
228+ ' Label' : [1 , 1 , 1 , 1 ],
229+ ' Sample' : [1 , 1 , 2 , 2 ]
230+ })
231+ design = Py_ExperimentalDesign.from_dataframe(df)
232+
233+ # Store to file
234+ design.store(" output_design.tsv" )
235+
236+ # Create from existing OpenMS objects
237+ from openms_python import Py_ConsensusMap
238+ consensus = Py_ConsensusMap.from_file(" results.consensusXML" )
239+ design = Py_ExperimentalDesign.from_consensus_map(consensus)
240+ ```
241+
192242### Iterate over containers and metadata
193243
194244All sequence-like wrappers (feature maps, consensus maps, identification containers,
0 commit comments