Skip to content

Commit 343be15

Browse files
committed
refactor publication and metadata handling in dataset definition
1 parent 3ad1557 commit 343be15

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

examples/from_custom_xlsx_file.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,6 @@
138138

139139
# %%
140140

141-
pub = Publication(
142-
title="Simple and Fast Maximally Deuterated Control (maxD) Preparation for Hydrogen-Deuterium Exchange Mass Spectrometry Experiments",
143-
doi="10.1021/acs.analchem.2c01446",
144-
url="https://pubs.acs.org/doi/10.1021/acs.analchem.2c01446",
145-
)
146-
147-
# %%
148-
# Make sure to add the correct licsense for your dataset
149-
# If you are the author, you can choose any license you like
150-
# The preferred / default license is CC0
151-
metadata = DatasetMetadata( # type: ignore[call-arg]
152-
authors=[Author(name="Daniele Peterle", affiliation="Northeastern University")],
153-
publication=pub,
154-
license="CC BY-NC 4.0",
155-
conversion_notes="Converted published Supplementary data",
156-
)
157-
158141
protein_info = ProteinIdentifiers(
159142
uniprot_accession_number="P68082",
160143
uniprot_entry_name="MYG_HORSE",
@@ -238,10 +221,25 @@
238221

239222
# %%
240223

224+
pub = Publication(
225+
title="Simple and Fast Maximally Deuterated Control (maxD) Preparation for Hydrogen-Deuterium Exchange Mass Spectrometry Experiments",
226+
doi="10.1021/acs.analchem.2c01446",
227+
url="https://pubs.acs.org/doi/10.1021/acs.analchem.2c01446",
228+
)
229+
230+
# Make sure to add the correct licsense for your dataset
231+
# If you are the author, you can choose any license you like
232+
# The preferred / default license is CC0
233+
241234
dataset = HDXDataSet( # type: ignore[call-arg]
242235
states=[state],
243236
description="1 Mb dataset from Peterle et al. 2022",
244-
metadata=metadata,
237+
metadata=DatasetMetadata( # type: ignore[call-arg]
238+
authors=[Author(name="Daniele Peterle", affiliation="Northeastern University")],
239+
publication=pub,
240+
license="CC BY-NC 4.0",
241+
conversion_notes="Converted published Supplementary data",
242+
),
245243
protein_identifiers=protein_info,
246244
structure=structure,
247245
)

0 commit comments

Comments
 (0)