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-1565 remove druggability #1340

Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
- name: start database, server, and app
run: |
echo "==> start database and data containers"
docker-compose -f "${{ env.DOCKER_COMPOSE_PATH }}" up -d
docker compose -f "${{ env.DOCKER_COMPOSE_PATH }}" up -d

echo "==> wait for data container to finish seeding database container"
DATA_CONTAINER=$(docker compose -f "${{ env.DOCKER_COMPOSE_PATH }}" ps -a --format '{{.Name}}' mongo-seed)
Expand All @@ -237,7 +237,7 @@ jobs:
pid=$(lsof -i :8080 -t) && kill ${pid}

echo "==> stop database"
docker-compose -f "${{ env.DOCKER_COMPOSE_PATH }}" down
docker compose -f "${{ env.DOCKER_COMPOSE_PATH }}" down

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "agora",
"version": "3.4.0",
"version": "3.5.0",
"data-file": "syn13363290",
"data-version": "70",
"data-version": "71",
"private": true,
"scripts": {
"dev": "concurrently --kill-others \"npm:dev:server\" \"npm:dev:app\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@ export class GeneNominatedTargetsComponent implements OnInit {
header: 'Pharos Class',
selected: false,
},
{
field: 'sm_druggability_display_value',
header: 'Small Molecule Druggability',
selected: false,
},
{
field: 'safety_rating_display_value',
header: 'Safety Rating',
selected: false,
},
{
field: 'ab_modality_display_value',
header: 'Antibody Modality',
selected: false,
},
];

constructor(private apiService: ApiService) {}
Expand Down Expand Up @@ -138,23 +123,8 @@ export class GeneNominatedTargetsComponent implements OnInit {
de.pharos_class_display_value = de.druggability[0].pharos_class
? de.druggability[0].pharos_class
: 'No value';
de.sm_druggability_display_value =
de.druggability[0].sm_druggability_bucket +
': ' +
de.druggability[0].classification;
de.safety_rating_display_value =
de.druggability[0].safety_bucket +
': ' +
de.druggability[0].safety_bucket_definition;
de.ab_modality_display_value =
de.druggability[0].abability_bucket +
': ' +
de.druggability[0].abability_bucket_definition;
} else {
de.pharos_class_display_value = 'No value';
de.sm_druggability_display_value = 'No value';
de.safety_rating_display_value = 'No value';
de.ab_modality_display_value = 'No value';
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ export class GeneSimilarComponent implements OnInit {
header: 'Protein Expression Change',
},
{ field: 'pharos_class_display_value', header: 'Pharos Class' },
{
field: 'sm_druggability_display_value',
header: 'Small Molecule Druggability',
},
{ field: 'safety_rating_display_value', header: 'Safety Rating' },
{ field: 'ab_modality_display_value', header: 'Antibody Modality' },
];

gctLink: { [key: string]: string } | undefined;
Expand Down Expand Up @@ -117,23 +111,8 @@ export class GeneSimilarComponent implements OnInit {
de.pharos_class_display_value = de.druggability[0].pharos_class
? de.druggability[0].pharos_class
: 'No value';
de.sm_druggability_display_value =
de.druggability[0].sm_druggability_bucket +
': ' +
de.druggability[0].classification;
de.safety_rating_display_value =
de.druggability[0].safety_bucket +
': ' +
de.druggability[0].safety_bucket_definition;
de.ab_modality_display_value =
de.druggability[0].abability_bucket +
': ' +
de.druggability[0].abability_bucket_definition;
} else {
de.pharos_class_display_value = 'No value';
de.sm_druggability_display_value = 'No value';
de.safety_rating_display_value = 'No value';
de.ab_modality_display_value = 'No value';
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,7 @@ export class GeneTableComponent implements OnInit {
} else if (a == null && b == null) {
result = 0;
} else if (typeof a === 'string' && typeof b === 'string') {
// Natural sorting for this score type, which can be >= 10
if (event.field === 'sm_druggability_display_value'
|| event.field === 'safety_rating_display_value'
|| event.field === 'ab_modality_display_value') {
let nA = parseInt(a.split(':')[0], 10);
let nB = parseInt(b.split(':')[0], 10);

nA = !isNaN(nA) ? nA : 999 * event.order;
nB = !isNaN(nB) ? nB : 999 * event.order;

result = nA < nB ? -1 : nA > nB ? 1 : 0;
} else {
result = a.localeCompare(b);
}
result = a.localeCompare(b);
} else {
result = a < b ? -1 : a > b ? 1 : 0;
}
Expand Down
3 changes: 0 additions & 3 deletions src/app/models/genes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ export interface Gene {
similar_genes_network?: SimilarGenesNetwork;

// Similar table (not in mongo document)
ab_modality_display_value?: string;
safety_rating_display_value?: string;
sm_druggability_display_value?: string;
pharos_class_display_value?: string;
is_any_rna_changed_in_ad_brain_display_value?: string;
is_any_protein_changed_in_ad_brain_display_value?: string;
Expand Down
53 changes: 0 additions & 53 deletions tests/nominated-targets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,4 @@ test.describe('specific viewport block', () => {
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle('Nominated Targets | Candidate genes for AD treatment or prevention');
});

test('has correct sort on druggability columns', async ({ page }) => {
await page.goto('/genes/nominated-targets');

await expect(page.locator('table')).toBeVisible();

await page.locator('#pr_id_3 span').click();

await page.getByLabel('Nominations').click();
await page.getByLabel('Year First Nominated').click();
await page.getByLabel('Nominating Teams').click();
await page.getByLabel('Cohort Study').click();
await page.getByLabel('Small Molecule Druggability').click();
await page.getByLabel('Safety Rating').click();
await page.getByLabel('Antibody Modality').click();

// sort forward on small molecule druggability
await page.getByRole('cell', { name: 'Small Molecule Druggability' }).click();

const row = page.locator('table tr:nth-child(2)');
let cell = row.getByRole('cell').nth(1);
await expect(cell).not.toContainText('No Value');

// sort reverse on small molecule druggability
await page.getByRole('cell', { name: 'Small Molecule Druggability' }).click();

cell = row.getByRole('cell').nth(1);
await expect(cell).not.toContainText('No Value');

// sort forward on safety rating
await page.getByRole('cell', { name: 'Safety Rating' }).click();

cell = row.getByRole('cell').nth(2);
await expect(cell).not.toContainText('No Value');

// sort reverse on safety rating
await page.getByRole('cell', { name: 'Safety Rating' }).click();

cell = row.getByRole('cell').nth(2);
await expect(cell).not.toContainText('No Value');

// sort forward on antibody modality
await page.getByRole('cell', { name: 'Antibody Modality' }).click();

cell = row.getByRole('cell').nth(3);
await expect(cell).not.toContainText('No Value');

// sort reverse on antibody modality
await page.getByRole('cell', { name: 'Antibody Modality' }).click();

cell = row.getByRole('cell').nth(3);
await expect(cell).not.toContainText('No Value');
});
});
7 changes: 0 additions & 7 deletions tests/similar-genes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,5 @@ test.describe('specific viewport block', () => {

const cell = await page.getByRole('row').nth(1).getByRole('cell').nth(1).innerText();
expect(cell).not.toBe('');


// sort reverse on small molecule druggability
await page.getByRole('cell', { name: 'Nominated Target' }).click();

const cell2 = await page.getByRole('row').nth(1).getByRole('cell').nth(1).innerText();
expect(cell2).not.toBe('');
});
});