-
Notifications
You must be signed in to change notification settings - Fork 9
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 #1199 from alliance-genome/test
Release 6.0.0 to Production
- Loading branch information
Showing
67 changed files
with
1,121 additions
and
223 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,6 @@ Thumbs.db | |
*.swp | ||
|
||
|
||
cdk-outputs.json | ||
cdk.context.json | ||
cdk.out |
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
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,9 @@ | ||
|
||
function AnnotationType({annotationType}) { | ||
if (annotationType) { | ||
return <>{annotationType.name}</>; | ||
} | ||
return <></>; | ||
} | ||
|
||
export default AnnotationType; |
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,25 @@ | ||
import CollapsibleList from '../collapsibleList/collapsibleList'; | ||
import ExternalLink from '../ExternalLink'; | ||
|
||
|
||
function makeAssertedGeneLink(curie, geneSymbol) { | ||
if(curie) { | ||
const symbol = <span dangerouslySetInnerHTML={{__html: geneSymbol}}/>; | ||
return <ExternalLink href={`https://www.alliancegenome.org/gene/${curie}`}>{symbol}</ExternalLink>; | ||
} | ||
return null; | ||
} | ||
|
||
function AssertedGenes({assertedGenes, mainRowCurie}) { | ||
const filteredAssertedGenes = assertedGenes?.filter(gene => gene.curie !== mainRowCurie); | ||
if(assertedGenes && assertedGenes.length > 1) { | ||
return ( | ||
<CollapsibleList collapsedSize={assertedGenes.length}> | ||
{filteredAssertedGenes.map(gene => makeAssertedGeneLink(gene.curie, gene.geneSymbol.displayText))} | ||
</CollapsibleList> | ||
); | ||
} | ||
return <></>; | ||
} | ||
|
||
export default AssertedGenes; |
6 changes: 6 additions & 0 deletions
6
apps/main-app/src/components/dataTable/AssociationCellCuration.js
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,6 @@ | ||
function AssociationCellCuration({ association }){ | ||
if(!association) return; | ||
return association.replaceAll('_', ' '); | ||
} | ||
|
||
export default AssociationCellCuration; |
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
23 changes: 23 additions & 0 deletions
23
apps/main-app/src/components/dataTable/DiseaseQualifiersColumn.js
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,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import CommaSeparatedList from '../commaSeparatedList'; | ||
import EvidenceCodeCuration from './EvidenceCodeCuration'; | ||
|
||
const DiseaseQualifiersColumn = ({qualifiers}) => { | ||
|
||
if (!qualifiers || !qualifiers.length) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<CommaSeparatedList> | ||
{qualifiers.map(qualifier => qualifier)} | ||
</CommaSeparatedList> | ||
); | ||
}; | ||
|
||
DiseaseQualifiersColumn.propTypes = { | ||
qualifiers: PropTypes.arrayOf(PropTypes.string), | ||
}; | ||
|
||
export default DiseaseQualifiersColumn; |
7 changes: 7 additions & 0 deletions
7
apps/main-app/src/components/dataTable/DropdownNoDataFilter.js
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,7 @@ | ||
import NoData from '../noData'; | ||
|
||
const DropdownNoDataFilter = () => { | ||
return <NoData>No Data to Filter</NoData>; | ||
}; | ||
|
||
export default DropdownNoDataFilter; |
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
57 changes: 57 additions & 0 deletions
57
apps/main-app/src/components/dataTable/GeneticModifiersCellCuration.js
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,57 @@ | ||
import React from 'react'; | ||
import { CollapsibleList } from '../collapsibleList'; | ||
import ExternalLink from '../ExternalLink'; | ||
import { getResourceUrl } from './getResourceUrl'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
|
||
function GeneticModifierLink(modifier) { | ||
switch(modifier?.type) { | ||
case 'Gene': | ||
if (modifier.geneSymbol) { | ||
return ( | ||
<Link to={`/gene/${modifier.curie}`} target='_blank'> | ||
<span dangerouslySetInnerHTML={{__html: modifier.geneSymbol.displayText}}/> | ||
</Link>); | ||
} | ||
break; | ||
case 'Allele': | ||
if (modifier.alleleSymbol) { | ||
return ( | ||
<Link to={`/allele/${modifier.curie}`} target='_blank'> | ||
<span dangerouslySetInnerHTML={{__html: modifier.alleleSymbol.displayText}}/> | ||
</Link>); | ||
} | ||
break; | ||
case 'AffectedGenomicModel': | ||
let url = getResourceUrl(modifier.curie, modifier.type, modifier.subtype); | ||
if (url && modifier.name) { | ||
return ( | ||
<ExternalLink href={url}> | ||
<span dangerouslySetInnerHTML={{__html: modifier.name}}/> | ||
</ExternalLink>); | ||
} | ||
break; | ||
default: | ||
return <></>; | ||
} | ||
return <></>; | ||
} | ||
|
||
function GeneticModifiersCellCuration ({relation, modifiers}) { | ||
if(relation && modifiers?.length > 0){ | ||
return (<dl> | ||
<React.Fragment> | ||
<dt>{relation.name?.replace(/_/, ' ')}:</dt> | ||
<dd> | ||
<CollapsibleList collapsedSize={modifiers.length}> | ||
{modifiers.map(GeneticModifierLink)} | ||
</CollapsibleList> | ||
</dd> | ||
</React.Fragment> | ||
</dl>); | ||
} | ||
return <></>; | ||
}; | ||
|
||
export default GeneticModifiersCellCuration; |
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,8 @@ | ||
|
||
function GeneticSex({geneticSex}) { | ||
if(geneticSex) | ||
return <>{geneticSex.name}</>; | ||
return <></>; | ||
} | ||
|
||
export default GeneticSex; |
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,7 @@ | ||
|
||
function NoteCell(note) { | ||
const prefix = note.noteType.name === "disease_note" ? "Note:" : "Summary:"; | ||
return note && (<div> <b>{prefix}</b> {note.freeText} </div>); | ||
} | ||
|
||
export default NoteCell; |
26 changes: 26 additions & 0 deletions
26
apps/main-app/src/components/dataTable/ProviderCellCuration.js
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,26 @@ | ||
import ExternalLink from "../ExternalLink"; | ||
|
||
function ProviderCellCuration({ provider }) { | ||
if(!provider) return null; | ||
|
||
const { dataProvider, secondaryDataProvider } = provider; | ||
|
||
return ( | ||
<span> | ||
<ExternalLink href={dataProvider.url} key={dataProvider.id} title={dataProvider.abbreviation}> | ||
{dataProvider.abbreviation} | ||
</ExternalLink> | ||
{ | ||
secondaryDataProvider && | ||
<> | ||
<i> via </i> | ||
<ExternalLink href={secondaryDataProvider.url} key={secondaryDataProvider.id} title={secondaryDataProvider.abbreviation}> | ||
{secondaryDataProvider.abbreviation} | ||
</ExternalLink> | ||
</> | ||
} | ||
</span> | ||
) | ||
} | ||
|
||
export default ProviderCellCuration; |
33 changes: 7 additions & 26 deletions
33
apps/main-app/src/components/dataTable/ProvidersCellCuration.js
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
Oops, something went wrong.