-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #909 from populationgenomics/dev
Release (family view)
- Loading branch information
Showing
30 changed files
with
2,422 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Family Individual ID Paternal ID Maternal ID Sex Affected | ||
Fam1 Father 1 2 | ||
Fam1 Mother 2 1 | ||
Fam1 Child1 Father Mother 2 1 | ||
Fam1 Child2 Father Mother 1 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import * as React from 'react' | ||
|
||
import { Table as SUITable } from 'semantic-ui-react' | ||
import { GraphQlAnalysis } from '../../__generated__/graphql' | ||
|
||
import Table from '../../shared/components/Table' | ||
import AnalysisLink from '../../shared/components/links/AnalysisLink' | ||
|
||
export interface IAnalysisGridAnalysis extends Partial<GraphQlAnalysis> { | ||
sgs?: string[] | ||
} | ||
|
||
export const AnalysisGrid: React.FC<{ | ||
analyses: IAnalysisGridAnalysis[] | ||
participantBySgId: { [sgId: string]: { externalId: string } } | ||
sgsById?: { [sgId: string]: { technology: string; platform: string } } | ||
highlightedIndividual?: string | null | ||
setAnalysisIdToView: (analysisId?: number | null) => void | ||
showSequencingGroup?: boolean | ||
}> = ({ | ||
analyses, | ||
participantBySgId, | ||
sgsById, | ||
highlightedIndividual, | ||
setAnalysisIdToView, | ||
showSequencingGroup, | ||
}) => { | ||
return ( | ||
<Table> | ||
<thead> | ||
<SUITable.Row> | ||
<SUITable.HeaderCell>ID</SUITable.HeaderCell> | ||
{showSequencingGroup && ( | ||
<SUITable.HeaderCell>Sequencing group</SUITable.HeaderCell> | ||
)} | ||
<SUITable.HeaderCell>Created</SUITable.HeaderCell> | ||
<SUITable.HeaderCell>Type</SUITable.HeaderCell> | ||
<SUITable.HeaderCell>Sequencing type</SUITable.HeaderCell> | ||
<SUITable.HeaderCell>Sequencing technology</SUITable.HeaderCell> | ||
<SUITable.HeaderCell>Output</SUITable.HeaderCell> | ||
</SUITable.Row> | ||
</thead> | ||
<tbody> | ||
{analyses?.map((a) => { | ||
const sgId = a.sgs?.length === 1 ? a.sgs[0] : null | ||
const sg = sgId ? sgsById?.[sgId] : null | ||
return ( | ||
<SUITable.Row | ||
key={a.id} | ||
style={{ | ||
backgroundColor: a.sgs?.some( | ||
(sg) => | ||
!!highlightedIndividual && | ||
participantBySgId[sg]?.externalId === highlightedIndividual | ||
) | ||
? 'var(--color-page-total-row)' | ||
: 'var(--color-bg-card)', | ||
}} | ||
> | ||
<SUITable.Cell> | ||
<AnalysisLink | ||
id={a.id} | ||
onClick={(e) => { | ||
e.preventDefault() | ||
e.stopPropagation() | ||
setAnalysisIdToView(a.id) | ||
}} | ||
/> | ||
</SUITable.Cell> | ||
{showSequencingGroup && ( | ||
<SUITable.Cell> | ||
{sg | ||
? sgId | ||
: a.sgs?.map((sg) => ( | ||
<li> | ||
{sg}{' '} | ||
{participantBySgId && sg in participantBySgId | ||
? `(${participantBySgId[sg]?.externalId})` | ||
: ''} | ||
</li> | ||
))} | ||
</SUITable.Cell> | ||
)} | ||
<SUITable.Cell>{a.timestampCompleted}</SUITable.Cell> | ||
<SUITable.Cell>{a.type}</SUITable.Cell> | ||
<SUITable.Cell>{a.meta?.sequencing_type}</SUITable.Cell> | ||
<SUITable.Cell> | ||
{!!sg && `${sg?.technology} (${sg?.platform})`} | ||
</SUITable.Cell> | ||
<td style={{ wordBreak: 'break-all' }}>{a.output}</td> | ||
</SUITable.Row> | ||
) | ||
})} | ||
</tbody> | ||
</Table> | ||
) | ||
} |
Oops, something went wrong.