Skip to content

Commit 3b737a0

Browse files
committed
Merge branch 'master' into refact/drs_individual_overview
2 parents e311854 + 5727c7d commit 3b737a0

File tree

4 files changed

+42
-21
lines changed

4 files changed

+42
-21
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"handlebars": "^4.7.8",
2222
"igv": "~2.15.13",
2323
"iso8601-duration": "^1.2.0",
24-
"lodash": "^4.17.21",
24+
"lodash": "^4.17.23",
2525
"lodash.debounce": "^4.0.8",
2626
"mammoth": "^1.8.0",
2727
"papaparse": "^5.4.1",

src/components/explorer/IndividualExperiments.js

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,23 @@ export const ExperimentDetail = ({ experiment }) => {
172172
const {
173173
id,
174174
biosample,
175+
description,
175176
experiment_type: experimentType,
176177
experiment_ontology: experimentOntology,
177178
molecule,
178179
molecule_ontology: moleculeOntology,
179180
instrument,
180181
study_type: studyType,
181182
extraction_protocol: extractionProtocol,
183+
protocol_url: protocolUrl,
184+
library_id: libraryId,
185+
library_description: libraryDescription,
182186
library_layout: libraryLayout,
183187
library_selection: librarySelection,
184188
library_source: librarySource,
185189
library_strategy: libraryStrategy,
190+
library_extract_id: libraryExtractId,
191+
insert_size: insertSize,
186192
experiment_results: experimentResults,
187193
extra_properties: extraProperties,
188194
} = experiment;
@@ -204,28 +210,30 @@ export const ExperimentDetail = ({ experiment }) => {
204210
<Descriptions.Item span={1} label="Biosample">
205211
<BiosampleLink biosample={biosample} />
206212
</Descriptions.Item>
213+
<Descriptions.Item span={3} label="Description">
214+
{description}
215+
</Descriptions.Item>
207216
<Descriptions.Item span={1} label="Experiment Type">
208217
{experimentType}
209218
</Descriptions.Item>
210219
<Descriptions.Item span={1} label="Experiment Ontology">
211-
{/*
212-
experiment_ontology is accidentally an array in Katsu, so this takes the first item
213-
and falls back to just the field (if we fix this in the future)
214-
*/}
215-
<OntologyTerm term={experimentOntology?.[0] ?? experimentOntology} />
220+
<OntologyTerm term={experimentOntology} />
216221
</Descriptions.Item>
217222
<Descriptions.Item span={1} label="Molecule">
218223
{molecule}
219224
</Descriptions.Item>
220225
<Descriptions.Item span={1} label="Molecule Ontology">
221-
{/*
222-
molecule_ontology is accidentally an array in Katsu, so this takes the first item
223-
and falls back to just the field (if we fix this in the future)
224-
*/}
225-
<OntologyTerm term={moleculeOntology?.[0] ?? moleculeOntology} />
226+
<OntologyTerm term={moleculeOntology} />
226227
</Descriptions.Item>
227228
<Descriptions.Item label="Study Type">{studyType}</Descriptions.Item>
229+
<Descriptions.Item label="Protocol URL">{protocolUrl}</Descriptions.Item>
228230
<Descriptions.Item label="Extraction Protocol">{extractionProtocol}</Descriptions.Item>
231+
<Descriptions.Item span={1} label="Library ID">
232+
{libraryId}
233+
</Descriptions.Item>
234+
<Descriptions.Item span={1} label="Library Description">
235+
{libraryDescription}
236+
</Descriptions.Item>
229237
<Descriptions.Item span={1} label="Library Layout">
230238
{libraryLayout}
231239
</Descriptions.Item>
@@ -238,6 +246,12 @@ export const ExperimentDetail = ({ experiment }) => {
238246
<Descriptions.Item span={1} label="Library Strategy">
239247
{libraryStrategy}
240248
</Descriptions.Item>
249+
<Descriptions.Item span={1} label="Library Extract ID">
250+
{libraryExtractId}
251+
</Descriptions.Item>
252+
<Descriptions.Item span={1} label="Insert Size">
253+
{insertSize}
254+
</Descriptions.Item>
241255
<Descriptions.Item span={2} label="Instrument">
242256
<div style={{ display: "flex", gap: 16 }}>
243257
<Device device={instrument.device} deviceOntology={instrument.device_ontology} />
@@ -292,7 +306,7 @@ const EXPERIMENT_COLUMNS = [
292306
{
293307
title: "Molecule",
294308
dataIndex: "molecule_ontology",
295-
render: (mo) => <OntologyTerm term={mo?.[0] ?? mo} />,
309+
render: (mo) => <OntologyTerm term={mo} />,
296310
},
297311
{
298312
title: "Experiment Results",

src/propTypes.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,26 @@ export const experimentResultPropTypesShape = PropTypes.shape({
305305

306306
export const experimentPropTypesShape = PropTypes.shape({
307307
id: PropTypes.string.isRequired,
308+
description: PropTypes.string,
308309
study_type: PropTypes.string,
309310

310311
experiment_type: PropTypes.string.isRequired,
311-
experiment_ontology: PropTypes.arrayOf(ontologyShape), // TODO: Array of ontology terms
312+
experiment_ontology: ontologyShape,
312313

313314
molecule: PropTypes.string,
314-
molecule_ontology: PropTypes.arrayOf(ontologyShape), // TODO: Array of ontology terms
315+
molecule_ontology: ontologyShape,
315316

317+
library_id: PropTypes.string,
318+
library_description: PropTypes.string,
316319
library_strategy: PropTypes.string,
317320
library_source: PropTypes.string,
318321
library_selection: PropTypes.string,
319322
library_layout: PropTypes.string,
323+
library_extract_id: PropTypes.string,
324+
325+
insert_size: PropTypes.number,
320326

327+
protocol_url: PropTypes.string,
321328
extraction_protocol: PropTypes.string,
322329
reference_registry_id: PropTypes.string,
323330

0 commit comments

Comments
 (0)