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

AG-959-ensembl-release-version #1266

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
3042e03
Create node.js.yml
sagely1 Nov 9, 2023
dd6135f
Update playwright.yml
sagely1 Nov 9, 2023
623a53f
Update node.js.yml
sagely1 Nov 9, 2023
8203c08
Delete .github/workflows/playwright.yml
sagely1 Nov 9, 2023
ecb3d05
Update node.js.yml
sagely1 Nov 9, 2023
0d8953e
Update playwright.config.ts
sagely1 Nov 9, 2023
dd3399d
Update playwright.config.ts
sagely1 Nov 10, 2023
598dc88
Adding Dev Container
sagely1 Nov 13, 2023
577632f
Fix typo
sagely1 Nov 14, 2023
d6ee1b7
add container
sagely1 Nov 14, 2023
3006c01
remove devcontainers
sagely1 Nov 14, 2023
5b03cd0
add var for baseURL
sagely1 Nov 14, 2023
ea21c22
trying localhost for baseURL
sagely1 Nov 14, 2023
0bd22e2
update node
sagely1 Nov 14, 2023
6d83144
Merge branch 'develop' of https://github.com/sagely1/Agora into develop
sagely1 Nov 14, 2023
b2b7b44
missing semicolon
sagely1 Nov 14, 2023
7b76422
reenabling tests
sagely1 Nov 14, 2023
6a0edd3
Merge branch 'develop' of https://github.com/sagely1/Agora into develop
sagely1 Nov 14, 2023
7e1990d
adding role-to-assume
sagely1 Nov 27, 2023
e287b9e
trying node 16
sagely1 Nov 27, 2023
fd47eb1
intentional break
sagely1 Nov 28, 2023
7f1e2d5
reverting
sagely1 Nov 28, 2023
ca527cc
forcing db url assignment
sagely1 Nov 28, 2023
451a756
fix syntax error
sagely1 Nov 28, 2023
0febe29
Update indentation
sagely1 Nov 28, 2023
75216f7
reverting
sagely1 Nov 28, 2023
7cdc07a
adding aws cred
sagely1 Nov 28, 2023
88832bc
fix syntax
sagely1 Nov 28, 2023
1b0205e
missing comment
sagely1 Nov 28, 2023
54b8ed5
test
sagely1 Nov 28, 2023
fa8f77a
test
sagely1 Nov 28, 2023
128c2b6
Update playwright.yml
sagely1 Nov 9, 2023
6693fcb
Update node.js.yml
sagely1 Nov 9, 2023
d7762b9
Delete .github/workflows/playwright.yml
sagely1 Nov 9, 2023
1c77eaa
Update playwright.config.ts
sagely1 Nov 9, 2023
30b023f
Update playwright.config.ts
sagely1 Nov 10, 2023
309f902
add var for baseURL
sagely1 Nov 14, 2023
da434a0
trying localhost for baseURL
sagely1 Nov 14, 2023
708f7f7
update node
sagely1 Nov 14, 2023
1ca2c40
reenabling tests
sagely1 Nov 14, 2023
87399da
missing semicolon
sagely1 Nov 14, 2023
93a99d0
Merge branch 'develop' of https://github.com/sagely1/Agora into develop
sagely1 Dec 4, 2023
d3b36a5
AG-959 Surface Ensembl release version
sagely1 Dec 7, 2023
646322d
Update playwright.yml
sagely1 Nov 9, 2023
e8b0519
Update node.js.yml
sagely1 Nov 9, 2023
56ef8ca
Delete .github/workflows/playwright.yml
sagely1 Nov 9, 2023
382509f
Update playwright.config.ts
sagely1 Nov 9, 2023
bfc4f3c
Update playwright.config.ts
sagely1 Nov 10, 2023
5526528
add var for baseURL
sagely1 Nov 14, 2023
10b542a
trying localhost for baseURL
sagely1 Nov 14, 2023
1659025
update node
sagely1 Nov 14, 2023
d84b566
reenabling tests
sagely1 Nov 14, 2023
249b707
missing semicolon
sagely1 Nov 14, 2023
ef82c95
Update playwright.yml
sagely1 Nov 9, 2023
884f5a9
Delete .github/workflows/playwright.yml
sagely1 Nov 9, 2023
dc27b95
trying node 16
sagely1 Nov 27, 2023
077d241
intentional break
sagely1 Nov 28, 2023
95184ae
reverting
sagely1 Nov 28, 2023
1163b30
forcing db url assignment
sagely1 Nov 28, 2023
0fcc105
fix syntax error
sagely1 Nov 28, 2023
81a19b3
Update indentation
sagely1 Nov 28, 2023
46a56e6
reverting
sagely1 Nov 28, 2023
52cc3ef
missing comment
sagely1 Nov 28, 2023
ae71862
AG-959 Surface Ensembl release version
sagely1 Dec 7, 2023
1b309aa
Merge branch 'AG-959-ensembl-release-version' of https://github.com/s…
sagely1 Dec 7, 2023
b85fa6d
reverting changes
sagely1 Dec 7, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
# retention-days: 30
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

14 changes: 8 additions & 6 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { defineConfig, devices } from '@playwright/test';

export const baseURL = 'http://localhost:8080';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
Expand All @@ -24,7 +26,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://127.0.0.1:8080',
baseURL: baseURL,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down Expand Up @@ -69,9 +71,9 @@ export default defineConfig({
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
webServer: {
command: 'npm run start',
url: baseURL,
reuseExistingServer: !process.env.CI,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,31 @@ <h2 class="gene-hero-name">
<p class="gene-hero-provider">
{{ getSummary() }}
</p>
<ng-container *ngIf="gene.bio_domains || getAlias()">
<ng-container *ngIf="gene.bio_domains || getAlias() || getEnsemblUrl() !== ''">
<hr />
<div *ngIf="gene.bio_domains" class="gene-hero-biodomains">
<h4 class="gene-hero-biodomains-heading">Biological Domains</h4>
<p>
{{ getBiodomains() }}
</p>
</div>
<div *ngIf="getAlias()" class="gene-hero-aliases">
<div *ngIf="getAlias() || getEnsemblUrl() !== ''" class="gene-hero-aliases">
<h4 class="gene-hero-aliases-heading">Also known as</h4>
<p *ngIf="gene.hgnc_symbol" class="mb-0">{{ gene.ensembl_gene_id }}</p>
<ng-container *ngIf="getEnsemblUrl() !== ''">
<p>
<a [href]="getEnsemblUrl()" target="_blank">{{ gene.ensembl_gene_id }}</a>
<span *ngIf="gene.ensembl_info[0].ensembl_release">
(Ensembl Release {{ gene.ensembl_info[0].ensembl_release }})
</span>
</p>
</ng-container>
<ng-container *ngIf="getEnsemblUrl() === ''">
<span *ngIf="getEnsemblUrl() === ''">{{ gene.ensembl_gene_id }}</span>
</ng-container>
<p *ngIf="gene.ensembl_info[0].ensembl_possible_replacements.length > 0">
<a [href]="getPossibleReplacementsURL()">Possible replacement value<span *ngIf="gene.ensembl_info[0].ensembl_possible_replacements.length > 1">s</span></a>:
{{ gene.ensembl_info[0].ensembl_possible_replacements.join(', ')}}
</p>
<p>
{{ getAlias() }}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ hr {
text-transform: uppercase;
margin-bottom: 15px;
}

.possible-replacements {
margin-bottom: 15px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,14 @@ describe('Component: Gene Hero', () => {
const expected = 'Immune Response, Lipid Metabolism, Structural Stabilization, Synapse, Vasculature';
expect(component.getBiodomains()).toBe(expected);
});

it('should return the ensembl permalink', () => {
component.gene = geneMock1;
expect(component.getEnsemblUrl()).toBe('https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794');
});

it('should return a url with ensembl id', () => {
component.gene = geneMock1;
expect(component.getPossibleReplacementsURL()).toBe('https://useast.ensembl.org/Homo_sapiens/Gene/Idhistory?g=ENSG00000147065');
});
});
11 changes: 11 additions & 0 deletions src/app/features/genes/components/gene-hero/gene-hero.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,15 @@ export class GeneHeroComponent {
.sort(ascending);
return biodomains.join(', ');
}

getEnsemblUrl() {
if (!this.gene?.ensembl_info)
return '';
return this.gene?.ensembl_info[0].ensembl_permalink;
}

getPossibleReplacementsURL() {
let url = 'https://useast.ensembl.org/Homo_sapiens/Gene/Idhistory?g=';
return url += this.gene?.ensembl_gene_id;
}
}
5 changes: 5 additions & 0 deletions src/app/models/EnsemblInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface EnsemblInfo {
ensembl_release: number;
ensembl_possible_replacements: string[];
ensembl_permalink: string;
}
3 changes: 3 additions & 0 deletions src/app/models/genes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
SimilarGenesNetwork,
BioDomains
} from './';
import { EnsemblInfo } from './EnsemblInfo';

export interface TargetNomination {
source: string;
Expand Down Expand Up @@ -98,6 +99,8 @@ export interface Gene {
input_data_display_value?: string;

bio_domains?: BioDomains;

ensembl_info: EnsemblInfo[];
}

export interface GenesResponse {
Expand Down
45 changes: 40 additions & 5 deletions src/app/testing/gene-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2934,7 +2934,14 @@ export const geneMock1: Gene = {
},
is_adi: false,
is_tep: true,
resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22MSN%22%5D%7D%5D%7D'
resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22MSN%22%5D%7D%5D%7D',
ensembl_info: [
{
ensembl_release: 84,
ensembl_possible_replacements: ['ENSG00000283172'],
ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794'
}
]
};

export const geneMock2: Gene = {
Expand Down Expand Up @@ -3121,7 +3128,14 @@ export const geneMock2: Gene = {
total_nominations: 3,
is_adi: false,
is_tep: true,
resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22PLEC%22%5D%7D%5D%7D'
resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22PLEC%22%5D%7D%5D%7D',
ensembl_info: [
{
ensembl_release: 84,
ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'],
ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794'
}
]
};

export const geneMock3: Gene = {
Expand Down Expand Up @@ -3243,7 +3257,14 @@ export const geneMock3: Gene = {
total_nominations: null,
is_adi: false,
is_tep: true,
resource_url: null
resource_url: null,
ensembl_info: [
{
ensembl_release: 84,
ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'],
ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794'
}
]
};

export const gctGeneMock1: GCTGene = {
Expand Down Expand Up @@ -3421,7 +3442,14 @@ export const nominatedGeneMock1: Gene = {
total_nominations: 4,
is_adi: false,
is_tep: false,
resource_url: null
resource_url: null,
ensembl_info: [
{
ensembl_release: 84,
ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'],
ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794'
}
]
} as Gene;

export const noHGNCgeneMock: Gene = {
Expand Down Expand Up @@ -3518,5 +3546,12 @@ export const noHGNCgeneMock: Gene = {
total_nominations: 4,
is_adi: false,
is_tep: false,
resource_url: null
resource_url: null,
ensembl_info: [
{
ensembl_release: 84,
ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'],
ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794'
}
]
} as Gene;
2 changes: 1 addition & 1 deletion src/server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (
],
{ region: 'us-east-1' }
);

if (results && results.Parameters) {
database.url =
'mongodb://' +
Expand Down
8 changes: 8 additions & 0 deletions src/server/models/genes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
TargetNomination,
Druggability,
} from '../../app/models';
import { EnsemblInfo } from '../../app/models/EnsemblInfo';
export { Gene } from '../../app/models';

// -------------------------------------------------------------------------- //
Expand Down Expand Up @@ -42,6 +43,12 @@ const MedianExpressionSchema = new Schema<MedianExpression>({
tissue: { type: String, required: true },
});

const EnsemblInfoSchema = new Schema<EnsemblInfo>({
ensembl_release: { type: Number, required: true },
ensembl_possible_replacements: { type: [String], required: true },
ensembl_permalink: { type: String, required: true }
});

const DruggabilitySchema = new Schema<Druggability>({
sm_druggability_bucket: { type: Number, required: true },
safety_bucket: { type: Number, required: true },
Expand Down Expand Up @@ -70,6 +77,7 @@ const GeneSchema = new Schema<Gene>(
median_expression: { type: [MedianExpressionSchema], required: true },
druggability: { type: [DruggabilitySchema], required: true },
total_nominations: { type: Number, required: true },
ensembl_info: { type: [EnsemblInfoSchema], required: true }
},
{ collection: 'geneinfo' }
);
Expand Down
File renamed without changes.