-
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.
* Started family view * completed family view + pedigree function * Finished family page * Started refactor * Created separate loading component * Got basic GraphQL working in frontend * Getting GraphQL types working * Lots of cleanup + progress towards GraphQL types * Merged dev into family view branch and resolved * Adding graphql queries * Swapped sample API to GraphQL * Added compile to build * Added eslintignore * Swapped family view to GraphQL * Worked throuhg refactor doc and implemented suggestions * Fixed search nav links * Separate TangledTree into its own PR * Fix linting errors * Implemented suggestions * Neatened temp pedigree component * Resync package-lock after dev merge * Added TangledTree component * Made suggested changes * Allow svgs in vite * fixed changed path * Added readme to pedigree folder * Formatting + colours * Improve graph borders + start family view * Temp add example of view * Add deceased to PersonNode * Progressive updates * Small small changes * Hide + show more web fields by default * A bunch of refactoring + including individual view * Linting * Simplify simplify * Fix quotes * Fix test * Minor stability improvements * Add participantID to more places * PR clean-up * My review feedback * Apply review feedback + add analysis view * Linting --------- Co-authored-by: Daniel <iamdanielreti@gmail.com> Co-authored-by: Michael Franklin <illusional@users.noreply.github.com>
- Loading branch information
1 parent
0bae32f
commit e7c6d49
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.