Skip to content

Commit

Permalink
pfocr enrichment for pathfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
rjawesome committed Sep 16, 2024
1 parent cbb8497 commit 066a273
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/inferred_mode/inferred_mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,9 @@ export default class InferredQueryHandler {
this.pruneKnowledgeGraph(response);

// add pfocr figures
this.logs = [...this.logs, ...(await enrichTrapiResultsWithPfocrFigures(response, true))];
if (!this.pathfinder) {
this.logs = [...this.logs, ...(await enrichTrapiResultsWithPfocrFigures(response, true))];
}

// get the final summary log
if (successfulQueries) {
Expand Down
4 changes: 4 additions & 0 deletions src/inferred_mode/pathfinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Debug from 'debug';
import generateTemplates from './pf_template_generator';
import biolink from '../biolink';
import { removeBioLinkPrefix } from '../utils';
import { enrichTrapiResultsWithPfocrFigures } from '../results_assembly/pfocr';
const debug = Debug('bte:biothings-explorer-trapi:pathfinder');

interface ResultAuxObject {
Expand Down Expand Up @@ -116,6 +117,9 @@ export default class PathfinderQueryHandler {
this.parse(creativeResponse);
this._pruneKg(creativeResponse);

// pfocr
this.logs = [...this.logs, ...(await enrichTrapiResultsWithPfocrFigures(creativeResponse, true))];

// logs
creativeResponse.logs = this.logs.map((log) => log.toJSON());

Expand Down

0 comments on commit 066a273

Please sign in to comment.