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-1221 add SRM option to GCT subcategory dropdown options #1278

Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
<div class="gct-filter-label">{{ subCategoryLabel }}</div>
<div class="gct-sub-category-selector">
<p-dropdown
id="subCategory"
[options]="subCategories"
[(ngModel)]="subCategory"
(onChange)="onSubCategoryChange()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ export const subCategories: { [key: string]: GCTSelectOption[] } = {
],
'Protein - Differential Expression': [
{
label: 'Label-free Quantification (LFQ)',
value: 'LFQ',
label: 'Targeted Selected Reaction Monitoring (SRM)',
sagely1 marked this conversation as resolved.
Show resolved Hide resolved
value: 'SRM',
},
{
label: 'Tandem Mass Tag (TMT)',
label: 'Genome-wide Tandem Mass Tag (TMT)',
value: 'TMT',
},
{
label: 'Genome-wide Label-free Quantification (LFQ)',
value: 'LFQ',
},
],
};

Expand Down
14 changes: 0 additions & 14 deletions src/server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,9 @@ const database = { url: '' };
doc && ('doc => ' + util.inspect(doc)), '\n');
}); */

console.log('HELLLLLLOOOOOOOO');
sagely1 marked this conversation as resolved.
Show resolved Hide resolved
console.log('HELLLLLLOOOOOOOO');
console.log('HELLLLLLOOOOOOOO');
console.log('HELLLLLLOOOOOOOO');
console.log('HELLLLLLOOOOOOOO');
console.log('HELLLLLLOOOOOOOO');
console.log('HELLLLLLOOOOOOOO');
console.log('HELLLLLLOOOOOOOO');
console.log(process.env);
console.log(process.env.MONGODB_HOST);
console.log(process.env.MONGODB_PORT);
console.log('DONE!');
console.log('DONE!');
console.log('DONE!');
console.log('DONE!');
console.log('DONE!');
console.log('DONE!');

// Set the database url
if (
Expand Down
8 changes: 7 additions & 1 deletion src/server/components/comparison.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
ProteomicsLFQCollection,
ProteomicsTMTCollection,
Team,
ProteomicsSRMCollection,
} from '../models';
import { BioDomains, TargetNomination, Scores } from '../../app/models';

Expand Down Expand Up @@ -208,11 +209,16 @@ export async function getProteinComparisonGenes(method: string) {
.lean()
.sort({ hgnc_symbol: 1, tissue: 1 })
.exec();
} else {
} else if ('LFQ' === method) {
items = await ProteomicsLFQCollection.find()
.lean()
.sort({ hgnc_symbol: 1, tissue: 1 })
.exec();
} else if ('SRM' === method) {
items = await ProteomicsSRMCollection.find()
.lean()
.sort({ hgnc_symbol: 1, tissue: 1 })
.exec();
}
sagely1 marked this conversation as resolved.
Show resolved Hide resolved

if (items) {
Expand Down
31 changes: 31 additions & 0 deletions tests/gene-comparison-tool.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { test, expect } from '@playwright/test';

test.describe('specific viewport block', () => {
test.slow();
test.use({ viewport: { width: 1600, height: 1200 } });

test('has title', async ({ page }) => {
await page.goto('/genes/comparison?category=Protein+-+Differential+Expression');

// wait for page to load (i.e. spinner to disappear)
await expect(page.locator('div:nth-child(4) > div > .spinner'))
.not.toBeVisible({ timeout: 250000});

// Expect a title "to contain" a substring.
await expect(page).toHaveTitle('Gene Comparison | Visual comparison tool for AD genes');
});

test('sub-category is SRM by default', async ({ page }) => {
test.slow();
sagely1 marked this conversation as resolved.
Show resolved Hide resolved
// set category for Protein - Differential Expression
await page.goto('/genes/comparison?category=Protein+-+Differential+Expression');

// wait for page to load (i.e. spinner to disappear)
await expect(page.locator('div:nth-child(4) > div > .spinner'))
.not.toBeVisible({ timeout: 150000});

// expect sub-category dropdown to be SRM
const dropdown = await page.locator('#subCategory');
sagely1 marked this conversation as resolved.
Show resolved Hide resolved
await expect(dropdown).toHaveText('Targeted Selected Reaction Monitoring (SRM)');
});
});