Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy 7.1.0 to production. #1313

Merged
merged 117 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
d091a9c
first shot at linking to JB2 instead of JB1
scottcain Feb 9, 2024
589cbc7
Merge pull request #1263 from alliance-genome/stage
scottcain Feb 27, 2024
a915be2
making generated JB2 links use only trackIds for tracks that actually…
scottcain Feb 28, 2024
25b448c
Merge pull request #1266 from alliance-genome/main
oblodgett Feb 28, 2024
4de8954
Merge pull request #1269 from alliance-genome/test
oblodgett Feb 28, 2024
cb8b72e
fair chance I got the proxy settings for jbrowse2 right
scottcain Feb 28, 2024
d34bee4
Merge pull request #1270 from alliance-genome/add_jbrowse2_cdk_to_stage
oblodgett Feb 28, 2024
0609c8a
making the variant jbrowse link generation point at jbrowse2
scottcain Feb 28, 2024
12e820e
removing species as an arg since taxonid is required.
scottcain Feb 28, 2024
aae4711
Merge pull request #1271 from alliance-genome/switch_to_jb2
scottcain Feb 29, 2024
10df6b4
adding jbrowse orthology track templates to constants
scottcain Feb 29, 2024
99c0c79
Update package.json
dustine32 Feb 29, 2024
55b116b
Merge pull request #1274 from alliance-genome/wc-gocam-viz-34
dustine32 Feb 29, 2024
a7327d4
added error checking for unlocalized genes and cleaned up presentatio…
scottcain Feb 29, 2024
9a93049
forgot the '2' on the jbrowse2 link
scottcain Feb 29, 2024
03dfdde
Merge pull request #1275 from alliance-genome/add_orthology_jbrowse2
scottcain Feb 29, 2024
cc35c8b
Added the default styles for gocam-viz
tmushayahama Mar 1, 2024
5af3172
updated the gocam-viz to display current legend
tmushayahama Mar 1, 2024
5c9203a
SCRUM-2025 update DiseaseToGeneTable for PG DAs
adamgibs Feb 21, 2024
47991a3
Added dockerfile for ui build
oblodgett Feb 22, 2024
b2c2bb4
Reverted deleted files
oblodgett Feb 22, 2024
a785af1
Reverted deleted files
oblodgett Feb 22, 2024
6266287
update package.json and Dockerfile
adamgibs Feb 22, 2024
7d33185
Added back nginx conf file
oblodgett Feb 22, 2024
eb0bd62
SCRUM-3647 add AnnotatedEntitiesPopupCuration to DiseaseToGeneTable
adamgibs Feb 28, 2024
9d0076c
Merge pull request #1276 from alliance-genome/SCRUM-2016
adamgibs Mar 1, 2024
9104175
Merge pull request #1277 from alliance-genome/update-gocam-viz-1272
oblodgett Mar 4, 2024
78cc317
SCRUM-3647 switched column order
adamgibs Mar 1, 2024
a412920
SCRUM-3647 add additional details columns
adamgibs Mar 1, 2024
173bfea
SCRUM-3647 suppress annotation details if via orthology
adamgibs Mar 1, 2024
a5087a2
SCRUM-3647 add reference link for via-orthology annotations
adamgibs Mar 4, 2024
fef5637
SCRUM-3647 add evidence code for via-orthology annotations
adamgibs Mar 4, 2024
c9d5764
Merge pull request #1278 from alliance-genome/SCRUM-3647
adamgibs Mar 4, 2024
0551bcb
SCRUM-3647 fix column error
adamgibs Mar 4, 2024
4b28407
SCRUM-3647 make assertedGenes link internal
adamgibs Mar 4, 2024
e006638
Merge pull request #1279 from alliance-genome/SCRUM-3647
adamgibs Mar 5, 2024
627c9e7
SCRUM-3648 add filter code to columns
adamgibs Mar 4, 2024
31c0eed
SCRUM-3648 add sortOptions
adamgibs Mar 4, 2024
8a9af29
SCRUM-3648 remove hardcoding for evidence code
adamgibs Mar 6, 2024
594ad0e
adding a few proxy lines to allow fetching RGD and XenBase data
scottcain Mar 7, 2024
adb6f83
Merge pull request #1281 from alliance-genome/SCRUM-3648
adamgibs Mar 7, 2024
fa58a7c
SCRUM-3649 add back download button
adamgibs Mar 7, 2024
a4f01a9
Merge pull request #1283 from alliance-genome/SCRUM-3649
adamgibs Mar 7, 2024
67bd1a2
rename filter for disease column
cmpich Mar 7, 2024
b56fda7
Merge pull request #1284 from alliance-genome/SCRUM-3648
cmpich Mar 7, 2024
a04239d
update disease filter
adamgibs Mar 7, 2024
5a6705c
SCRUM-3648 update basedOn column help text
adamgibs Mar 7, 2024
2207047
SCRUM-3648 update gene filter name
adamgibs Mar 7, 2024
3647e38
Merge pull request #1286 from alliance-genome/SCRUM-3648
adamgibs Mar 7, 2024
66b6b17
Merge pull request #1285 from alliance-genome/disease-filter-update
oblodgett Mar 7, 2024
991b13c
Merge pull request #1282 from alliance-genome/update-jbrowse-proxy
scottcain Mar 7, 2024
e8ebe6c
update gene diseaseAnnotationTable reference column to use pumModIds
adamgibs Mar 12, 2024
d4178b2
upate diseasePage associated genes table to use pubmedPubModIDs
adamgibs Mar 14, 2024
bd45a70
update allelePage disease assocations table to use pubmedPubModIDs
adamgibs Mar 14, 2024
220ae66
remove getRefStrings
adamgibs Mar 14, 2024
5e6c0cc
update AnnotatedEntitiesPopupCuration to use pubModIds
adamgibs Mar 15, 2024
e43fd77
remove getRefString
adamgibs Mar 15, 2024
9332de4
remove underscores in disease qualifiers
adamgibs Mar 15, 2024
108c3c9
Merge pull request #1287 from alliance-genome/update-ref-string
adamgibs Mar 15, 2024
d0b65f2
bumping seqpanel version to give explicit warning about inferred sequ…
scottcain Mar 26, 2024
689b681
Merge pull request #1288 from alliance-genome/KANBAN-522
scottcain Mar 26, 2024
4bb010c
Update README.md
motenko Mar 28, 2024
bdd06bf
Merge pull request #1289 from alliance-genome/motenko-patch-1
motenko Mar 28, 2024
7bb6909
adding region highlighting for variants linked out to JBrowse
scottcain Apr 2, 2024
0ebdcb1
updating jbrowse menu link to point at JB2
scottcain Apr 3, 2024
e5f1628
Merge pull request #1294 from alliance-genome/update_jbrowse_link
scottcain Apr 3, 2024
22e8b2f
Merge pull request #1293 from alliance-genome/jbrowse_add_var_hilite
scottcain Apr 3, 2024
fea5a7d
improving the buffer around genes when highlighting a variant
scottcain Apr 3, 2024
cff3508
Merge pull request #1295 from alliance-genome/improve_jb2_buffer
scottcain Apr 3, 2024
6b5e93f
Made changes to columns according to new API Response
VarunReddy1111 Apr 4, 2024
8da7bb0
Indentation
VarunReddy1111 Apr 5, 2024
9d3fe07
Changed the disease link rendering component
VarunReddy1111 Apr 5, 2024
c4c06f3
Added filter names
VarunReddy1111 Apr 5, 2024
5228560
Changes to Gene Table in Disease Page
VarunReddy1111 Apr 8, 2024
71d2a75
Merge pull request #1296 from alliance-genome/SCRUM-3743
VarunReddy1111 Apr 8, 2024
9efb2b6
Revert "SCRUM-3743 UI work to display disease page associated alleles…
VarunReddy1111 Apr 8, 2024
4b6901b
Merge pull request #1297 from alliance-genome/revert-1296-SCRUM-3743
VarunReddy1111 Apr 8, 2024
82e4d03
Fixed gene table in disease page according to API fields
VarunReddy1111 Apr 9, 2024
b70e725
better spacing
VarunReddy1111 Apr 9, 2024
3faee95
Removed the method getGeneObject
VarunReddy1111 Apr 9, 2024
13d0600
Merge pull request #1298 from alliance-genome/fixing-disease-table-ge…
VarunReddy1111 Apr 10, 2024
13f059a
Fixing gene hyperlink
VarunReddy1111 Apr 17, 2024
c19e141
Disabling downloads for data tables larger than 90000 rows
VarunReddy1111 Apr 17, 2024
f05e868
Added downloads page link
VarunReddy1111 Apr 17, 2024
7950217
indentation fix
VarunReddy1111 Apr 17, 2024
b924504
Removed unsued useState import
VarunReddy1111 Apr 17, 2024
1152225
Removed setDisabled function
VarunReddy1111 Apr 17, 2024
803c50f
Changed the constant name to DOWNLOAD_BUTTON_THRESHOLD
VarunReddy1111 Apr 18, 2024
e5f8b25
Merge pull request #1300 from alliance-genome/SCRUM-3919
VarunReddy1111 Apr 18, 2024
e2ba550
Merge pull request #1301 from alliance-genome/SCRUM-3943
VarunReddy1111 Apr 18, 2024
ade3c70
Change to fix allele page disease associations table to not display A…
VarunReddy1111 Apr 18, 2024
b6d1c4c
Merge pull request #1303 from alliance-genome/fixing-allele-page-dise…
VarunReddy1111 Apr 18, 2024
48fcacc
Change to display the additional implicated genes in annotation pop d…
VarunReddy1111 Apr 19, 2024
3f14cd7
Merge pull request #1304 from alliance-genome/SCRUM-3943
VarunReddy1111 Apr 19, 2024
690445a
adding proxy entries for JB2 for test and production
scottcain Apr 19, 2024
4f99f6f
Change in annotation details pop
VarunReddy1111 Apr 19, 2024
1e986f6
Merge pull request #1306 from alliance-genome/fixing-allele-page-dise…
VarunReddy1111 Apr 19, 2024
66d03f7
Update release to the snapshot date
oblodgett Apr 26, 2024
6b56143
Merge pull request #1307 from alliance-genome/change_release_date
oblodgett Apr 26, 2024
b0e24ec
SCRUM-3985 update basedOn and GeneticModifiersCellCuration identifiers
adamgibs Apr 26, 2024
f5966eb
remove unused release data variable
adamgibs Apr 26, 2024
36c279d
Merge pull request #1308 from alliance-genome/SCRUM-3985
adamgibs Apr 26, 2024
fbd317c
SCRUM-3986 update StrainBackground identifier
adamgibs Apr 29, 2024
b4f7df5
Merge pull request #1309 from alliance-genome/SCRUM-3986
adamgibs Apr 29, 2024
96047c4
Updated test API server
oblodgett May 1, 2024
f632691
Merge branch 'stage' into update_cdk_jbrowse
oblodgett May 1, 2024
45caf96
Merge branch 'test' into stage
oblodgett May 1, 2024
c543694
Merge branch 'stage' into update_cdk_jbrowse
oblodgett May 1, 2024
bee3bcb
Updated test API server
oblodgett May 1, 2024
940f53d
Merge branch 'stage' into update_cdk_jbrowse
oblodgett May 1, 2024
be79cb9
Merge pull request #1305 from alliance-genome/update_cdk_jbrowse
oblodgett May 1, 2024
b05013c
Merge pull request #1310 from alliance-genome/stage
oblodgett May 1, 2024
8b46914
fixes undefined problem, but not the ui problem (the jbrowse ortholog…
scottcain May 2, 2024
5164a60
removes the jbrowse orthology link panel for sars-cov-2
scottcain May 2, 2024
2373ad2
Merge pull request #1311 from alliance-genome/fix_jbrowse_covid
oblodgett May 2, 2024
9c92040
Added new make file targets for ui deployments
oblodgett May 2, 2024
94f6920
Merge pull request #1312 from alliance-genome/fix_redirects
oblodgett May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
.git
dist
package-lock.json
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ARG DOCKER_PULL_TAG=latest
ARG REG=100225593120.dkr.ecr.us-east-1.amazonaws.com
FROM ${REG}/agr_base_linux_env:${DOCKER_PULL_TAG} as build-stage

WORKDIR /workdir/agr_ui

ADD . .

RUN mkdir /workdir/agr_ui/build

ARG NODE_ENV=production
ENV NODE_ENV ${NODE_ENV}

RUN /bin/bash -c 'PS1=x && . /root/.profile && nvm install && nvm use && npm install --legacy-peer-deps && npm run build'

FROM nginx

WORKDIR /workdir/agr_ui/build

COPY --from=build-stage /workdir/agr_ui/build /workdir/agr_ui/build
COPY --from=build-stage /workdir/agr_ui/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 3000
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ test-alb-deploy:
prod-alb-deploy:
npx aws-cdk deploy prod-alb-stack

stage-ui-deploy:
npx aws-cdk deploy agr-ui-stage

test-ui-deploy:
npx aws-cdk deploy agr-ui-test

prod-ui-deploy:
npx aws-cdk deploy agr-ui-production

uirun:
npm start

Expand Down
9 changes: 8 additions & 1 deletion cdk/amplify-production-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ export class AmplifyProductionStack extends cdk.Stack {
{ source: 'https://alliancegenome.org', target: 'https://www.alliancegenome.org', status: amplify.RedirectStatus.PERMANENT_REDIRECT },

{ source: '/api/<*>', target: 'https://prod-alb.alliancegenome.org/api/<*>', status: amplify.RedirectStatus.REWRITE },


{ source: '/jbrowse2', target: 'https://www.alliancegenome.org/jbrowse2/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse2/', target: 'https://main.dgaayxgqoarxf.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse2/<*>', target: 'https://main.dgaayxgqoarxf.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseXTJBrowse/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/data/xt9_1/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseXLJBrowse/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/data/xl9_2/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseData/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/RGDJBrowse/<*>', target: 'https://rgd.mcw.edu/jbrowse2/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/protein', target: 'https://www.alliancegenome.org/jbrowse/worms/protein/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse/worms/protein/', target: 'https://main.djgvd7iswt7yy.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/protein/<*>', target: 'https://main.djgvd7iswt7yy.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },
Expand Down
7 changes: 7 additions & 0 deletions cdk/amplify-stage-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ export class AmplifyStageStack extends cdk.Stack {

const stage_paths = [
{ source: '/api/<*>', target: 'https://stage-api.alliancegenome.org/api/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse2', target: 'https://stage.alliancegenome.org/jbrowse2/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse2/', target: 'https://stage.dgaayxgqoarxf.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse2/<*>', target: 'https://stage.dgaayxgqoarxf.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseXTJBrowse/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/data/xt9_1/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseXLJBrowse/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/data/xl9_2/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseData/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/RGDJBrowse/<*>', target: 'https://rgd.mcw.edu/jbrowse2/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/protein', target: 'https://stage.alliancegenome.org/jbrowse/worms/protein/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse/worms/protein/', target: 'https://staging.djgvd7iswt7yy.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/protein/<*>', target: 'https://staging.djgvd7iswt7yy.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },
Expand Down
7 changes: 7 additions & 0 deletions cdk/amplify-test-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export class AmplifyTestStack extends cdk.Stack {
const test_paths = [
{ source: '/api/<*>', target: 'https://test-alb.alliancegenome.org/api/<*>', status: amplify.RedirectStatus.REWRITE },

{ source: '/jbrowse2', target: 'https://test.alliancegenome.org/jbrowse2/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse2/', target: 'https://stage.dgaayxgqoarxf.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse2/<*>', target: 'https://stage.dgaayxgqoarxf.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseXTJBrowse/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/data/xt9_1/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseXLJBrowse/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/data/xl9_2/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/XenBaseData/<*>', target: 'https://jbrowse.xenbase.org/XenJBrowse/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowsedata/RGDJBrowse/<*>', target: 'https://rgd.mcw.edu/jbrowse2/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/protein', target: 'https://test.alliancegenome.org/jbrowse/worms/protein/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse/worms/protein/', target: 'https://main.djgvd7iswt7yy.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/protein/<*>', target: 'https://main.djgvd7iswt7yy.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },
Expand Down
4 changes: 2 additions & 2 deletions cdk/cdk-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ new AmplifyALBStack(app, 'stage-alb-stack', {
new AmplifyALBStack(app, 'test-alb-stack', {
stackName: 'test-alb-stack',
dnsName: 'test',
targetInstanceId: 'i-003fafec7d050fd97',
targetInstanceId: 'i-0ccfdcd8c43104be5',
env: {
region: process.env.CDK_DEFAULT_REGION,
account: process.env.CDK_DEFAULT_ACCOUNT,
Expand All @@ -30,7 +30,7 @@ new AmplifyALBStack(app, 'test-alb-stack', {
new AmplifyALBStack(app, 'prod-alb-stack', {
stackName: 'prod-alb-stack',
dnsName: 'prod',
targetInstanceId: 'i-003fafec7d050fd97',
targetInstanceId: 'i-0ccfdcd8c43104be5',
env: {
region: process.env.CDK_DEFAULT_REGION,
account: process.env.CDK_DEFAULT_ACCOUNT,
Expand Down
7 changes: 7 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server {
listen 3000;
root /workdir/agr_ui/build;
index index.html;

error_page 404 =200 /index.html;
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@geneontology/curie-util-es5": "^1.2.4",
"@geneontology/wc-gocam-viz": "0.0.51",
"@geneontology/wc-gocam-viz": "1.0.0",
"@geneontology/wc-ribbon-strips": "0.0.37",
"@geneontology/wc-ribbon-table": "0.0.57",
"@testing-library/jest-dom": "^5.16.1",
Expand All @@ -28,7 +28,7 @@
"custom-event-polyfill": "^1.0.6",
"d3-selection": "2.0.0",
"document-register-element": "1.13.1",
"generic-sequence-panel": "^1.4.0",
"generic-sequence-panel": "^1.4.1",
"html-react-parser": "^0.10.0",
"immutable": "^3.8.1",
"lodash.clone": "^4.5.0",
Expand Down
34 changes: 18 additions & 16 deletions src/components/dataTable/AnnotatedEntitiesPopupCuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,30 @@ import AnnotationType from './AnnotationType';
import AssociationCellCuration from './AssociationCellCuration';
import AssertedGenes from './AssertedGenes';
import GeneticModifiersCellCuration from './GeneticModifiersCellCuration';
import { buildProviderWithUrl } from './utils';
import { buildProviderWithUrl, getIdentifier } from './utils';
import StrainBackground from './StrainBackground';

function renderLink(entity) {
const url = getResourceUrl(entity.subject.curie, entity.subject.type, entity.subject.subtype)
const curie = getIdentifier(entity.diseaseAnnotationSubject);
const url = getResourceUrl(curie, entity.diseaseAnnotationSubject.type, entity.diseaseAnnotationSubject.subtype)

if (entity.type === 'AlleleDiseaseAnnotation') {
const innerText = entity.subject.alleleSymbol ? entity.subject.alleleSymbol.displayText : entity.subject.name;
const innerText = entity.diseaseAnnotationSubject.alleleSymbol ? entity.diseaseAnnotationSubject.alleleSymbol.displayText : entity.diseaseAnnotationSubject.name;
const inner = <span dangerouslySetInnerHTML={{__html: innerText}}/>;
return <Link to={`/allele/${entity.subject.curie}`}>{inner}</Link>;
return <Link to={`/allele/${curie}`}>{inner}</Link>;
} else if(entity.type === 'GeneDiseaseAnnotation'){
const innerText = entity.subject.geneSymbol ? entity.subject.geneSymbol.displayText : entity.subject.name;
const innerText = entity.diseaseAnnotationSubject.geneSymbol ? entity.diseaseAnnotationSubject.geneSymbol.displayText : entity.diseaseAnnotationSubject.name;
const inner = <span dangerouslySetInnerHTML={{__html: innerText}}/>;
return <Link to={`/gene/${entity.subject.curie}`}>{inner}</Link>;
return <Link to={`/gene/${curie}`}>{inner}</Link>;
} else {
const inner = <span dangerouslySetInnerHTML={{__html: entity.subject.name}}/>;
return <ExternalLink href={url}>{inner}</ExternalLink>;
const inner = <span dangerouslySetInnerHTML={{__html: entity.diseaseAnnotationSubject.name}}/>;
return <ExternalLink href={url}>{inner}</ExternalLink>;
}
}

function AnnotatedEntitiesPopupCuration(props) {
const {children, entities, parentPage, mainRowCurie } = props;


function AnnotatedEntitiesPopupCuration({ children, entities, parentPage, mainRowCurie, pubModIds }) {

if (!entities || !entities.length) {
return null;
Expand All @@ -68,11 +70,11 @@ function AnnotatedEntitiesPopupCuration(props) {
<th>Name</th>
<th>Type</th>
<th className={style.associationCell}>Association</th>
{ parentPage === 'gene' ? <th>Additional implicated genes</th> : <></> }
{ parentPage === 'gene' || parentPage === 'disease' ? <th>Additional implicated genes</th> : <></> }
<th>Experimental condition</th>
<th></th>
<th>Genetic Modifiers</th>
{ parentPage === 'gene' ? <th>Strain Background</th> : <></> }
{ parentPage === 'gene' || parentPage === 'disease' ? <th>Strain Background</th> : <></> }
<th>Genetic Sex</th>
<th className={style.relatedNotes}>Notes</th>
<th>Annotation type</th>
Expand All @@ -88,19 +90,19 @@ function AnnotatedEntitiesPopupCuration(props) {
return (
<tr key={entity.id}>
<td>{renderLink(entity)}</td>
<td><TypeCellCuration subject={entity.subject}/></td>
<td><TypeCellCuration subject={entity.diseaseAnnotationSubject}/></td>
<td><AssociationCellCuration association={entity.relation?.name}/></td>
{ parentPage === 'gene' ? <td><AssertedGenes assertedGenes={entity.assertedGenes} mainRowCurie={mainRowCurie}/></td> : <></>}
{ parentPage === 'gene' || parentPage === 'disease' ? <td><AssertedGenes assertedGenes={entity.assertedGenes} mainRowCurie={mainRowCurie}/></td> : <></>}
<td><ExperimentalConditionCellCuration conditions={entity.conditionRelations}/></td>
<td><ExperimentalConditionCellCuration conditions={entity.conditionModifiers}/></td>
<td><GeneticModifiersCellCuration relation={entity.diseaseGeneticModifierRelation} modifiers={entity.diseaseGeneticModifiers}/></td>
{ parentPage === 'gene' ? <td><StrainBackground strainBackground={entity.sgdStrainBackground}/></td> : <></> }
{ parentPage === 'gene' || parentPage === 'disease' ? <td><StrainBackground strainBackground={entity.sgdStrainBackground}/></td> : <></> }
<td><GeneticSex geneticSex={entity.geneticSex}/></td>
<td><RelatedNotes className={style.relatedNotes} relatedNotes={entity.relatedNotes}/></td>
<td><AnnotationType annotationType={entity.annotationType}/></td>
<td><EvidenceCodesCellCuration evidenceCodes={entity.evidenceCodes}/></td>
<td><ProviderCellCuration provider={provider} /></td>
<td><SingleReferenceCellCuration singleReference={entity.singleReference}/></td>
<td><SingleReferenceCellCuration singleReference={entity.singleReference} pubModIds={pubModIds}/></td>
</tr>
)
})
Expand Down
9 changes: 5 additions & 4 deletions src/components/dataTable/AssertedGenes.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import CollapsibleList from '../collapsibleList/collapsibleList';
import ExternalLink from '../ExternalLink';
import { Link } from 'react-router-dom';
import { getIdentifier } from './utils';


function makeAssertedGeneLink(curie, geneSymbol) {
if(curie) {
const symbol = <span dangerouslySetInnerHTML={{__html: geneSymbol}}/>;
return <ExternalLink href={`https://www.alliancegenome.org/gene/${curie}`}>{symbol}</ExternalLink>;
return <Link to={`/gene/${curie}`}>{symbol}</Link>;
}
return null;
}

function AssertedGenes({assertedGenes, mainRowCurie}) {
const filteredAssertedGenes = assertedGenes?.filter(gene => gene.curie !== mainRowCurie);
const filteredAssertedGenes = assertedGenes?.filter(gene => getIdentifier(gene) !== mainRowCurie);
if(assertedGenes && assertedGenes.length > 1) {
return (
<CollapsibleList collapsedSize={assertedGenes.length}>
{filteredAssertedGenes.map(gene => makeAssertedGeneLink(gene.curie, gene.geneSymbol.displayText))}
{filteredAssertedGenes.map(gene => makeAssertedGeneLink(getIdentifier(gene), gene.geneSymbol.displayText))}
</CollapsibleList>
);
}
Expand Down
23 changes: 19 additions & 4 deletions src/components/dataTable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import HorizontalScroll from '../horizontalScroll';
import { buildTableQueryString } from '../../lib/utils';
import LoadingSpinner from '../loadingSpinner';
import DropdownNoDataFilter from './DropdownNoDataFilter';
import {DOWNLOAD_BUTTON_THRESHOLD} from '../../constants';
import { Link } from 'react-router-dom';

const DataTable = ({
className,
Expand Down Expand Up @@ -120,6 +122,8 @@ const DataTable = ({
onSizePerPageChange: scrollIntoView
});

let disabled = paginationObj.options?.totalSize > DOWNLOAD_BUTTON_THRESHOLD;

columns.forEach(column => {
const filterField = column.filterName || column.dataField;
const columnFilter = filters &&
Expand Down Expand Up @@ -221,10 +225,21 @@ const DataTable = ({
)
}
</PaginationProvider>
{downloadUrl &&
<DownloadButton
downloadUrl={`${downloadUrl}${downloadUrl.indexOf('?') < 0 ? '?' : '&'}${buildTableQueryString(tableState)}`}
/>
{
downloadUrl &&
<DownloadButton
downloadUrl={`${downloadUrl}${downloadUrl.indexOf('?') < 0 ? '?' : '&'}${buildTableQueryString(tableState)}`}
disabled={disabled}
/>
}
{
disabled &&
<div style={{color: 'red'}}>
The table above cannot be downloaded because there are too many rows in the unfiltered table.
Please apply filter(s) to limit the number of rows to less than {DOWNLOAD_BUTTON_THRESHOLD} to enable the Download button or visit our
<Link to="/downloads"> Downloads page </Link>
to download the entire data set.
</div>
}
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/dataTable/DiseaseQualifiersColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const DiseaseQualifiersColumn = ({qualifiers}) => {
if (!qualifiers || !qualifiers.length) {
return null;
}

return (
<CommaSeparatedList>
{qualifiers.map(qualifier => qualifier)}
{qualifiers.map(qualifier => qualifier.replaceAll("_", " "))}
</CommaSeparatedList>
);
};
Expand Down
8 changes: 5 additions & 3 deletions src/components/dataTable/GeneticModifiersCellCuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@ import { CollapsibleList } from '../collapsibleList';
import ExternalLink from '../ExternalLink';
import { getResourceUrl } from './getResourceUrl';
import { Link } from 'react-router-dom';
import { getIdentifier } from './utils';


function GeneticModifierLink(modifier) {
const identifier = getIdentifier(modifier);
switch(modifier?.type) {
case 'Gene':
if (modifier.geneSymbol) {
return (
<Link to={`/gene/${modifier.curie}`} target='_blank'>
<Link to={`/gene/${identifier}`} target='_blank'>
<span dangerouslySetInnerHTML={{__html: modifier.geneSymbol.displayText}}/>
</Link>);
}
break;
case 'Allele':
if (modifier.alleleSymbol) {
return (
<Link to={`/allele/${modifier.curie}`} target='_blank'>
<Link to={`/allele/${identifier}`} target='_blank'>
<span dangerouslySetInnerHTML={{__html: modifier.alleleSymbol.displayText}}/>
</Link>);
}
break;
case 'AffectedGenomicModel':
let url = getResourceUrl(modifier.curie, modifier.type, modifier.subtype);
let url = getResourceUrl(identifier, modifier.type, modifier.subtype);
if (url && modifier.name) {
return (
<ExternalLink href={url}>
Expand Down
13 changes: 13 additions & 0 deletions src/components/dataTable/ReferencesCellViaOrthologyCuration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

import ExternalLink from '../ExternalLink';

const ReferenceCellViaOrthologyCuration = () => {
const curie = "MGI:6194238";
const url = `http://www.informatics.jax.org/accession/${curie}`;
return (
<ExternalLink href={url} key={curie} title={curie}>{curie}</ExternalLink>
);
};

export default ReferenceCellViaOrthologyCuration;
Loading
Loading