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

Release textpresso rules #1319

Merged
merged 6 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions cdk/amplify-production-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class AmplifyProductionStack extends cdk.Stack {
{ source: '/jbrowse/worms/jbrowse2', target: 'https://www.alliancegenome.org/jbrowse/worms/jbrowse2/', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/jbrowse/worms/jbrowse2/', target: 'https://main.d2jjb0xowet5mr.amplifyapp.com/', status: amplify.RedirectStatus.REWRITE },
{ source: '/jbrowse/worms/jbrowse2/<*>', target: 'https://main.d2jjb0xowet5mr.amplifyapp.com/<*>', status: amplify.RedirectStatus.REWRITE },

{ source: '/agr_simplemine.cgi', target: 'https://caltech-curation.textpressolab.com/pub/cgi-bin/forms/agr_simplemine.cgi', status: amplify.RedirectStatus.REWRITE },

{ source: '/jbrowse/<*>', target: 'https://prod-alb.alliancegenome.org/jbrowse/<*>', status: amplify.RedirectStatus.REWRITE },
Expand All @@ -65,10 +65,19 @@ export class AmplifyProductionStack extends cdk.Stack {
{ source: '/textpresso/wb', target: 'https://www.alliancegenome.org/textpresso/wb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/wb/', target: 'https://www.alliancegenome.org/textpresso/wb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/wb/<*>', target: 'https://wb-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/mgi', target: 'https://www.alliancegenome.org/textpresso/mgi/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/mgi/', target: 'https://www.alliancegenome.org/textpresso/mgi/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/mgi/<*>', target: 'https://mgi-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/zfin', target: 'https://www.alliancegenome.org/textpresso/zfin/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/zfin/', target: 'https://www.alliancegenome.org/textpresso/zfin/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/zfin/<*>', target: 'https://zfin-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/fb', target: 'https://www.alliancegenome.org/textpresso/fb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/fb/', target: 'https://www.alliancegenome.org/textpresso/fb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/fb/<*>', target: 'https://fb-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },

{ source: '/<*>', target: '/index.html', status: amplify.RedirectStatus.NOT_FOUND_REWRITE },
{ source: '</^[^.]+$/>', target: '/index.html', status: amplify.RedirectStatus.REWRITE }

];

const amplifyApp = new amplify.App(this, 'agr-ui-production', {
Expand Down
13 changes: 12 additions & 1 deletion cdk/amplify-stage-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class AmplifyStageStack extends cdk.Stack {
{ 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: '/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 },
Expand Down Expand Up @@ -51,12 +51,23 @@ export class AmplifyStageStack extends cdk.Stack {
{ source: '/bluegenes', target: 'https://stage.alliancegenome.org/bluegenes/alliancemine', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/bluegenes/', target: 'https://stage.alliancegenome.org/bluegenes/alliancemine', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/bluegenes/<*>', target: 'https://stage-alliancemine.alliancegenome.org:444/bluegenes/<*>', status: amplify.RedirectStatus.REWRITE },

{ source: '/textpresso/sgd', target: 'https://stage.alliancegenome.org/textpresso/sgd/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/sgd/', target: 'https://stage.alliancegenome.org/textpresso/sgd/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/sgd/<*>', target: 'https://sgd-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/wb', target: 'https://stage.alliancegenome.org/textpresso/wb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/wb/', target: 'https://stage.alliancegenome.org/textpresso/wb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/wb/<*>', target: 'https://wb-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/mgi', target: 'https://stage.alliancegenome.org/textpresso/mgi/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/mgi/', target: 'https://stage.alliancegenome.org/textpresso/mgi/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/mgi/<*>', target: 'https://mgi-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/zfin', target: 'https://stage.alliancegenome.org/textpresso/zfin/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/zfin/', target: 'https://stage.alliancegenome.org/textpresso/zfin/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/zfin/<*>', target: 'https://zfin-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/fb', target: 'https://stage.alliancegenome.org/textpresso/fb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/fb/', target: 'https://stage.alliancegenome.org/textpresso/fb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/fb/<*>', target: 'https://fb-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },

{ source: '/<*>', target: '/index.html', status: amplify.RedirectStatus.NOT_FOUND_REWRITE },
{ source: '</^[^.]+$/>', target: '/index.html', status: amplify.RedirectStatus.REWRITE }
];
Expand Down
16 changes: 16 additions & 0 deletions cdk/amplify-test-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ export class AmplifyTestStack extends cdk.Stack {
{ source: '/swagger-ui/<*>', target: 'https://test-alb.alliancegenome.org/swagger-ui/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/openapi', target: 'https://test-alb.alliancegenome.org/openapi', status: amplify.RedirectStatus.REWRITE },

{ source: '/textpresso/sgd', target: 'https://test.alliancegenome.org/textpresso/sgd/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/sgd/', target: 'https://test.alliancegenome.org/textpresso/sgd/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/sgd/<*>', target: 'https://sgd-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/wb', target: 'https://test.alliancegenome.org/textpresso/wb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/wb/', target: 'https://test.alliancegenome.org/textpresso/wb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/wb/<*>', target: 'https://wb-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/mgi', target: 'https://test.alliancegenome.org/textpresso/mgi/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/mgi/', target: 'https://test.alliancegenome.org/textpresso/mgi/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/mgi/<*>', target: 'https://mgi-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/zfin', target: 'https://test.alliancegenome.org/textpresso/zfin/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/zfin/', target: 'https://test.alliancegenome.org/textpresso/zfin/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/zfin/<*>', target: 'https://zfin-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },
{ source: '/textpresso/fb', target: 'https://test.alliancegenome.org/textpresso/fb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/fb/', target: 'https://test.alliancegenome.org/textpresso/fb/tpc', status: amplify.RedirectStatus.PERMANENT_REDIRECT },
{ source: '/textpresso/fb/<*>', target: 'https://fb-textpresso.alliancegenome.org/<*>', status: amplify.RedirectStatus.REWRITE },

{ source: '/<*>', target: '/index.html', status: amplify.RedirectStatus.NOT_FOUND_REWRITE },
{ source: '</^[^.]+$/>', target: '/index.html', status: amplify.RedirectStatus.REWRITE }
];
Expand Down
6 changes: 5 additions & 1 deletion src/components/dataTable/AnnotatedEntitiesPopupCuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ import StrainBackground from './StrainBackground';

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

if (entity.type === 'AlleleDiseaseAnnotation') {
const innerText = entity.diseaseAnnotationSubject.alleleSymbol ? entity.diseaseAnnotationSubject.alleleSymbol.displayText : entity.diseaseAnnotationSubject.name;
Expand Down
2 changes: 1 addition & 1 deletion src/components/dataTable/GeneticModifiersCellCuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function GeneticModifierLink(modifier) {
}
break;
case 'AffectedGenomicModel':
let url = getResourceUrl(identifier, modifier.type, modifier.subtype);
let url = getResourceUrl({ curie: identifier, type: modifier.type, subtype: modifier.subtype});
if (url && modifier.name) {
return (
<ExternalLink href={url}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/dataTable/getResourceUrl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resourceDescriptors } from "../../resourceDescriptors";

export const getResourceUrl = (curie, type, subtype ) => {
export const getResourceUrl = ({ curie, type, subtype }) => {
const [prefix, id] = curie.split(':');

let resource;
Expand Down
7 changes: 6 additions & 1 deletion src/components/dataTable/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ export const getIsViaOrthology = (annotation) => {
};

export const getSingleReferenceUrl = (pubModId) => {
const url = getResourceUrl(pubModId);
let url;
if(pubModId.includes("PMID")){
url = getResourceUrl({curie: pubModId});
} else {
url = getResourceUrl({curie: pubModId, type: "reference"});
}
return {pubModId, url};
}

Expand Down
Loading