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

added dataset as part of payload

parent 9c05a9f7
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,7 @@ export class NetworkComponent implements OnInit {
this.currentViewNodes.forEach((protein) => {
this.queryItems.push(getWrapperFromNode(protein));
});
console.log(this.queryItems)
}
public saveAddNodes(nodeList: Node[]) {
......@@ -111,7 +112,7 @@ export class NetworkComponent implements OnInit {
public updateAdjacentProteinDisorders(bool: boolean) {
this.adjacentDisordersProtein = bool;
if (this.adjacentDisordersProtein) {
this.netex.adjacentDisorders(this.nodeData.nodes, 'proteins').subscribe(response => {
this.netex.adjacentDisorders(this.nodeData.nodes, 'proteins', this.drugstoneConfig.config.associatedProteinDisorder).subscribe(response => {
for (const interaction of response.edges) {
const edge = { from: interaction.protein, to: interaction.disorder };
this.adjacentProteinDisorderEdgesList.push(mapCustomEdge(edge, this.drugstoneConfig.config));
......@@ -139,7 +140,7 @@ export class NetworkComponent implements OnInit {
public updateAdjacentDrugDisorders(bool: boolean) {
this.adjacentDisordersDrug = bool;
if (this.adjacentDisordersDrug) {
this.netex.adjacentDisorders(this.nodeData.nodes, 'drugs').subscribe(response => {
this.netex.adjacentDisorders(this.nodeData.nodes, 'drugs', this.drugstoneConfig.config.indicationDrugDisorder).subscribe(response => {
for (const interaction of response.edges) {
const edge = { from: interaction.drug, to: interaction.disorder };
this.adjacentDrugDisorderEdgesList.push(mapCustomEdge(edge, this.drugstoneConfig.config));
......
......@@ -96,9 +96,9 @@ export class NetexControllerService {
return this.http.get(`${environment.backend}tissue_expression/`, {params});
}
public adjacentDisorders(nodes: Node[], nodeType: string): Observable<any> {
public adjacentDisorders(nodes: Node[], nodeType: string, dataset: string): Observable<any> {
const params = {};
const params = {dataset:dataset};
if (nodeType === 'proteins') {
// @ts-ignore
params.proteins = nodes.map((node: Node) => node.drugstoneId && node.drugstoneId.startsWith('p') ? node.drugstoneId.slice(1) : undefined).filter(id => id != null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment