Skip to content
Open
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"@ng-bootstrap/ng-bootstrap": "1.0.0",
"@ng-select/ng-select": "^1.4.1",
"@swimlane/ngx-datatable": "^11.3.2",
"core-js": "2.4.1",
"angular": "^1.7.8",
"@sentry/browser": "^4.6.5",
"angular-datatables": "^5.0.0",
"bootstrap": "^4.3.1",
"core-js": "2.4.1",
"datatables.net": "^1.10.16",
"datatables.net-dt": "^1.10.16",
"file-saver": "^1.3.8",
Expand Down
2 changes: 0 additions & 2 deletions src/main/webapp/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
PageRibbonComponent,
ErrorComponent
} from './layouts';
import { EmailService } from './service/email.service';
import { ConverterComponent } from './converter/converter.component';
import { ConnectionService } from './service/connection.service';
import { DrugComponent } from './drug/drug.component';
Expand Down Expand Up @@ -108,7 +107,6 @@ export class SentryErrorHandler implements ErrorHandler {
UserRouteAccessService,
TrialService,
ConnectionService,
EmailService,
MetaService,
UserRouteAccessService,
{
Expand Down
14 changes: 1 addition & 13 deletions src/main/webapp/app/genomic/genomic.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,7 @@ export class GenomicComponent implements OnInit {
});
}
validateGenomicExample() {
if (this.genomicInput.hugo_symbol && this.genomicInput.annotated_variant && this.genomicInput.matching_examples) {
const variantsTobeValidated = 'hugoSymbol=' + this.genomicInput.hugo_symbol + '&variant=' +
this.genomicInput.annotated_variant + '&examples=' + this.genomicInput.matching_examples;
this.connectionService.validateGenomicExample(variantsTobeValidated).subscribe((result) => {
if (result[this.genomicInput.matching_examples] === true) {
this.validationMessage['example'] = 'Valid';
this.exampleValidation = true;
} else {
this.validationMessage['example'] = 'Invalid';
this.exampleValidation = false;
}
});
}
// TODO: generate new logics to validate genomic variant format
}
getMessageStyle(type) {
const result = (type === 'gene' ? this.geneValidation : this.exampleValidation);
Expand Down
5 changes: 2 additions & 3 deletions src/main/webapp/app/layouts/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
<div class="row footer-row-2">
<div class="col-md-4 col-lg-4 col-sm-12 col-xs-12">
<div class="">
<a href="mailto:team@oncokb.org" target="_top">Contact us</a>
<a href="https://twitter.com/OncoKB" target="_blank">Twitter</a>
<a href="swagger-ui/index.html">API</a>
</div>
</div>
<div class="col-md-4 col-lg-4 col-sm-12 col-xs-12 mskcc-footer-logo0-wrapper">
<a class="logo" href="http://mskcc.org" title="Memorial Sloan Kettering Cancer Center">
<a class="logo" href="https://www.mskcc.org" title="Memorial Sloan Kettering Cancer Center">
<span><img src="../../../content/images/MSKLogo_fff.png" class="mskcc-footer-logo"></span>
</a>
</div>
<div class="col-md-4 col-lg-4 col-sm-12 col-xs-12 mskcc">
<span>© 2018 Memorial Sloan Kettering Cancer Center</span>
<span>© 2023 Memorial Sloan Kettering Cancer Center</span>
</div>
</div>
</div>
Expand Down
6 changes: 0 additions & 6 deletions src/main/webapp/app/layouts/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
<li class="nav-item">
<a class="nav-link" routerLink="trials" routerLinkActive="active">Trials</a>
</li>
<li class="nav-item" *ngIf="!oncokb">
<a class="nav-link" routerLink="data" routerLinkActive="active">Data</a>
</li>
<li class="nav-item" *ngIf="oncokb">
<a class="nav-link" routerLink="meta" routerLinkActive="active">Meta</a>
</li>
</ul>
</div>
<div class="navbar-collapse collapse" id="navbarResponsive" [ngbCollapse]="isNavbarCollapsed" [ngSwitch]="isAuthenticated()">
Expand Down
24 changes: 0 additions & 24 deletions src/main/webapp/app/service/connection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,21 @@ export class ConnectionService {
return 'http://oncotree.mskcc.org/api/mainTypes?version=' + MainUtil.oncotreeVersion;
case 'SubType':
return 'http://oncotree.mskcc.org/api/tumorTypes/search';
case 'OncoKBVariant':
return 'http://oncokb.org/api/v1/variants';
case 'GeneValidation':
return 'http://mygene.info/v3/query?species=human&q=symbol:';
case 'ClinicalTrials':
return 'https://clinicaltrialsapi.cancer.gov/v1/clinical-trial/';
case 'MskTrials':
return 'https://discover.mskcc.org:443/api/trials/';
case 'ExampleValidation':
return 'http://oncokb.org/api/v1/utils/match/variant?';
}
} else {
switch (type) {
case 'MainType':
return SERVER_API_URL + 'proxy/http/oncotree.mskcc.org/api/mainTypes?version=' + MainUtil.oncotreeVersion;
case 'SubType':
return SERVER_API_URL + 'proxy/http/oncotree.mskcc.org/api/tumorTypes/search';
case 'OncoKBVariant':
return SERVER_API_URL + 'proxy/http/oncokb.org/api/v1/variants';
case 'GeneValidation':
return SERVER_API_URL + 'proxy/http/mygene.info/v3/query?species=human&q=symbol:';
case 'ClinicalTrials':
return SERVER_API_URL + 'proxy/https/clinicaltrialsapi.cancer.gov/v1/clinical-trial/';
case 'MskTrials':
return SERVER_API_URL + 'proxy/https/discover.mskcc.org:443/api/trials/';
case 'ExampleValidation':
return SERVER_API_URL + 'proxy/http/oncokb.org/api/v1/utils/match/variant?';
}
}
}
Expand All @@ -54,18 +42,10 @@ export class ConnectionService {
return this.http.get(this.getAPIUrl('GeneValidation') + hugoSymbol);
}

validateGenomicExample(variantsTobeValidated: string) {
return this.http.get(this.getAPIUrl('ExampleValidation') + variantsTobeValidated);
}

importTrials(tempTrial: string) {
return this.http.get(this.getAPIUrl('ClinicalTrials') + tempTrial);
}

getTrialByProtocolNo(protocolNo: string) {
return this.http.get(this.getAPIUrl('MskTrials') + protocolNo);
}

getMainType() {
return this.http.get(this.getAPIUrl('MainType'));
}
Expand All @@ -74,10 +54,6 @@ export class ConnectionService {
return this.http.post(this.getAPIUrl('SubType'), query);
}

getOncoKBVariant(): Observable<Array<any>> {
return this.http.get<Array<any>>(this.getAPIUrl('OncoKBVariant'));
}

getDrugs(query: string) {
return this.http.get(this.getAPIUrl('Drugs') + `?name=${query}`);
}
Expand Down
30 changes: 0 additions & 30 deletions src/main/webapp/app/service/email.service.ts

This file was deleted.

42 changes: 6 additions & 36 deletions src/main/webapp/app/service/trial.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Clinical } from '../clinical/clinical.model';
import { MovingPath } from '../panel/movingPath.model';
import { Arm } from '../arm/arm.model';
import * as _ from 'lodash';
import { EmailService } from './email.service';
import { ConnectionService } from './connection.service';
import { HttpErrorResponse } from '@angular/common/http';
import { of } from 'rxjs/observable/of';
Expand Down Expand Up @@ -83,7 +82,7 @@ export class TrialService {
nctIdChosen = '';
errorList: Array<object> = [];

constructor(public connectionService: ConnectionService, public db: AngularFireDatabase, private emailService: EmailService) {
constructor(public connectionService: ConnectionService, public db: AngularFireDatabase) {
this.nctIdChosenObs.subscribe((message) => this.nctIdChosen = message);
this.trialsRef = db.object('Trials');
this.additionalRef = db.object('Additional');
Expand Down Expand Up @@ -129,22 +128,6 @@ export class TrialService {
}, (error: HttpErrorResponse) => {
this.getErrorResponse(error, 'main type');
});
// prepare oncokb variant list
this.connectionService.getOncoKBVariant().subscribe((res) => {
const allAnnotatedVariants = res;
for (const item of allAnnotatedVariants) {
if (item['gene']['hugoSymbol']) {
if (this.annotated_variants[item['gene']['hugoSymbol']]) {
this.annotated_variants[item['gene']['hugoSymbol']].push(item['alteration']);
} else {
this.annotated_variants[item['gene']['hugoSymbol']] = [item['alteration']];
}
}
}
for (const key of _.keys(this.annotated_variants)) {
this.annotated_variants[key].sort();
}
});
}
fetchTrials() {
this.trialsRef.snapshotChanges().subscribe((action) => {
Expand Down Expand Up @@ -274,19 +257,11 @@ export class TrialService {
});
}
saveErrors(info: string, content: object, error: object) {
if (info.includes('failed') && info.includes('database')) {
this.emailService.sendEmail({
sendTo: MainUtil.devEmail,
subject: info,
content: 'Content: \n' + JSON.stringify(content) + '\n\n Error: \n' + JSON.stringify(error)
});
} else {
this.errorList.push({
'info': info,
'content': content,
'error': error
});
}
this.errorList.push({
'info': info,
'content': content,
'error': error
});
}
getNodeDisplayContent(key: string, node: object) {
let result = '';
Expand All @@ -306,11 +281,6 @@ export class TrialService {
} else if (error.status === 503) {
alert('Sorry, required data source is unavailable now.');
} else {
this.emailService.sendEmail({
sendTo: MainUtil.devEmail,
subject: 'Matchminer Curate http request failed.',
content: 'Error: \n' + JSON.stringify(error)
});
alert('Sorry, unexpected error happens. Our development team has been notified.');
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/trial/trial.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container trial-container">
<div class="input-group">
<input type="text" class="form-control" [(ngModel)]="trialsToImport" placeholder="Enter trial in the format: NCT02057133 or 14-085"
<input type="text" class="form-control" [(ngModel)]="trialsToImport" placeholder="Enter trial in the format: NCT02057133"
size="100">
<span class="input-group-btn">
<button class="btn btn-primary" [disabled]="!trialsToImport" (click)="importTrials()">Import New Trials</button>
Expand Down
21 changes: 0 additions & 21 deletions src/main/webapp/app/trial/trial.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,6 @@ export class TrialComponent implements OnInit, AfterViewInit {
}
}
this.importTrialsFromNct(nctId);
} else if ( tempTrial.match( /^\d+-\d+$/g ) && this.oncokb) {
this.connectionService.getTrialByProtocolNo( tempTrial ).subscribe( ( res ) => {
nctId = res['tds_data']['nct_id'];
if ( this.trialListIds.includes( nctId ) ) {
if (!this.isRedownloadTrial(tempTrial + '/' + nctId)) {
return;
}
}
const mskInfo = {
protocol_no: res['msk_id'],
principal_investigator: {
full_name: res['tds_data']['primary_investigator']['full_name'],
credentials: res['tds_data']['primary_investigator']['credentials'],
email: res['tds_data']['primary_investigator']['email'],
url: res['tds_data']['primary_investigator']['msk_url']
}
};
this.importTrialsFromNct(nctId, mskInfo);
}, ( error ) => {
this.messages.push( tempTrial + ' not found' );
});
} else {
this.messages.push( tempTrial + ' is invalid trial format' );
continue;
Expand Down