Skip to content
Snippets Groups Projects
Commit f5e8bcc4 authored by AndiMajore's avatar AndiMajore
Browse files

show only primary id in result table

parent cd31df52
No related branches found
No related tags found
No related merge requests found
...@@ -313,6 +313,7 @@ ...@@ -313,6 +313,7 @@
[tableProteinScoreTooltip]="tableDrugScoreTooltip" [tableProteinScoreTooltip]="tableDrugScoreTooltip"
[tableProteinSelection]="tableProteinSelection" [tableProteinSelection]="tableProteinSelection"
[tableSelectedProteins]="tableSelectedProteins" [tableSelectedProteins]="tableSelectedProteins"
[identifier]="myConfig.identifier"
></app-prot-table> ></app-prot-table>
</div> </div>
</div> </div>
......
...@@ -445,7 +445,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit ...@@ -445,7 +445,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit
}) })
for (const nodeId of Object.keys(details)) { for (const nodeId of Object.keys(details)) {
const nodeDetails = details[nodeId] const nodeDetails = details[nodeId]
console.log(nodeId)
nodeDetails.id = nodeDetails.id ? nodeDetails.id : (typeof nodeDetails.drugstoneId === 'string' ? nodeDetails.drugstoneId : nodeDetails.drugstoneId[0]); nodeDetails.id = nodeDetails.id ? nodeDetails.id : (typeof nodeDetails.drugstoneId === 'string' ? nodeDetails.drugstoneId : nodeDetails.drugstoneId[0]);
if (nodeDetails.drugstoneId && nodeDetails.drugstoneType === 'protein') { if (nodeDetails.drugstoneId && nodeDetails.drugstoneType === 'protein') {
// node is protein from database, has been mapped on init to backend protein from backend // node is protein from database, has been mapped on init to backend protein from backend
......
...@@ -6,13 +6,21 @@ ...@@ -6,13 +6,21 @@
<th class="checkbox-col"> <th class="checkbox-col">
<p-tableHeaderCheckbox class="drgstn"></p-tableHeaderCheckbox> <p-tableHeaderCheckbox class="drgstn"></p-tableHeaderCheckbox>
</th> </th>
<th [pSortableColumn]="'uniprotAc'"> <th *ngIf="identifier === 'symbol'" [pSortableColumn]="'symbol'">
Symbol
<p-sortIcon [field]="'symbol'"></p-sortIcon>
</th>
<th *ngIf="identifier === 'uniprot'" [pSortableColumn]="'uniprotAc'">
UniProt Code UniProt Code
<p-sortIcon [field]="'uniprotAc'"></p-sortIcon> <p-sortIcon [field]="'uniprotAc'"></p-sortIcon>
</th> </th>
<th [pSortableColumn]="'symbol'"> <th *ngIf="identifier === 'entrez'" [pSortableColumn]="'entrez'">
Symbol Entrez
<p-sortIcon [field]="'symbol'"></p-sortIcon> <p-sortIcon [field]="'entrez'"></p-sortIcon>
</th>
<th *ngIf="identifier === 'ensg'" [pSortableColumn]="'ensg'">
Ensembl GeneID
<p-sortIcon [field]="'ensg'"></p-sortIcon>
</th> </th>
<th [pSortableColumn]="'proteinName'"> <th [pSortableColumn]="'proteinName'">
Name Name
...@@ -37,8 +45,18 @@ ...@@ -37,8 +45,18 @@
<td> <td>
<p-tableCheckbox [value]="e" class="drgstn"></p-tableCheckbox> <p-tableCheckbox [value]="e" class="drgstn"></p-tableCheckbox>
</td> </td>
<td><a href="https://www.uniprot.org/uniprot/{{ e.uniprotAc }}" target="_blank">{{ e.uniprotAc }}</a></td> <td *ngIf="identifier === 'symbol'" >
<td>{{e.symbol}}</td> <a *ngFor="let symbol of e.symbol; index as i" href="https://www.genecards.org/cgi-bin/carddisp.pl?gene={{symbol }}" target="_blank">{{ symbol +(i == e.symbol.length -1 ? "":", ")}}</a>
</td>
<td *ngIf="identifier === 'uniprot'" >
<a *ngFor="let uniprot of e.uniprotAc; index as i" href="https://www.uniprot.org/uniprot/{{uniprot }}" target="_blank">{{ uniprot +(i == e.uniprotAc.length -1 ? "":", ")}}</a>
</td>
<td *ngIf="identifier === 'entrez'" >
<a *ngFor="let entrez of e.entrez; index as i" href="https://www.ncbi.nlm.nih.gov/gene/{{entrez }}" target="_blank">{{ entrez +(i == e.entrez.length -1 ? "":", ")}}</a>
</td>
<td *ngIf="identifier === 'ensg'" >
<a *ngFor="let ensg of e.ensg; index as i" href="https://www.ensembl.org/Homo_sapiens/Gene/Summary?g={{ensg }}" target="_blank">{{ ensg +(i == e.ensg.length -1 ? "":", ")}}</a>
</td>
<td>{{e.proteinName}}</td> <td>{{e.proteinName}}</td>
<td *ngIf="tableHasScores">{{e.score | number}}</td> <td *ngIf="tableHasScores">{{e.score | number}}</td>
<td> <td>
......
import {Component, Input, OnInit, ViewEncapsulation} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import { faTimes, faCheck } from '@fortawesome/free-solid-svg-icons'; import { faTimes, faCheck } from '@fortawesome/free-solid-svg-icons';
import {faQuestionCircle} from '@fortawesome/free-regular-svg-icons'; import {faQuestionCircle} from '@fortawesome/free-regular-svg-icons';
@Component({ @Component({
...@@ -12,6 +12,7 @@ export class ProtTableComponent implements OnInit { ...@@ -12,6 +12,7 @@ export class ProtTableComponent implements OnInit {
@Input() public tableProteinScoreTooltip = ""; @Input() public tableProteinScoreTooltip = "";
@Input() public tableProteins = [] @Input() public tableProteins = []
@Input() public tableSelectedProteins @Input() public tableSelectedProteins
@Input() public identifier = "symbol"
@Input() public tableProteinSelection : (args: any) => void @Input() public tableProteinSelection : (args: any) => void
public faTimes = faTimes; public faTimes = faTimes;
public faCheck = faCheck; public faCheck = faCheck;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment