forked from GenSpectrum/cov-spectrum-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SequencingCoverageDeepExplore.tsx
50 lines (48 loc) · 2 KB
/
SequencingCoverageDeepExplore.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from 'react';
import { SequencingRepresentativenessChartWidget } from '../widgets/SequencingRepresentativenessChartWidget';
import { NamedCard } from './NamedCard';
import { GridCell, PackedGrid } from './PackedGrid';
import { MetadataAvailabilityChartWidget } from '../widgets/MetadataAvailabilityChartWidget';
import { SequencingIntensityChartWidget } from '../widgets/SequencingIntensityChartWidget';
import { DateCountSampleDataset } from '../data/sample/DateCountSampleDataset';
import { CaseCountAsyncDataset } from '../data/CaseCountDataset';
import { DatelessCountrylessCountSampleDataset } from '../data/sample/DatelessCountrylessCountSampleDataset';
interface Props {
dateCountDataset: DateCountSampleDataset;
datelessCountDataset: DatelessCountrylessCountSampleDataset;
caseCountDataset: CaseCountAsyncDataset;
}
export const SequencingCoverageDeepExplore = React.memo(
({ dateCountDataset, datelessCountDataset, caseCountDataset }: Props) => {
return (
<PackedGrid maxColumns={2}>
<GridCell minWidth={600}>
<SequencingIntensityChartWidget.ShareableComponent
title='Sequencing Intensity Over Time'
sequencingCounts={dateCountDataset}
caseCounts={caseCountDataset}
height={300}
widgetLayout={NamedCard}
/>
</GridCell>
<GridCell minWidth={600}>
<MetadataAvailabilityChartWidget.ShareableComponent
title='Metadata Availability'
sampleSet={datelessCountDataset}
height={300}
/>
</GridCell>
{datelessCountDataset.selector.location.country === 'Switzerland' && (
<GridCell minWidth={1600}>
<SequencingRepresentativenessChartWidget.ShareableComponent
title='Sequencing Intensity by Attribute'
caseDataset={caseCountDataset}
sampleDataset={datelessCountDataset}
height={500}
/>
</GridCell>
)}
</PackedGrid>
);
}
);