Skip to content

Commit

Permalink
Merge pull request #39 from biothings/fix-entity-switch
Browse files Browse the repository at this point in the history
fix wrong order of entities being parsed in metakg cnstruction
  • Loading branch information
newgene committed Sep 16, 2021
2 parents b85648b + 161c207 commit 87333a5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/operations_builder/sync_operations_builder_with_reasoner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ export default class SyncOperationsBuilderWithReasoner extends BaseOperationsBui
if (!("predicates" in metadata)) {
return ops;
}
Object.keys(metadata.predicates).map((sbj) => {
Object.keys(metadata.predicates[sbj]).map((obj) => {
if (Array.isArray(metadata.predicates[sbj][obj])) {
metadata.predicates[sbj][obj].map((pred) => {
//predicates are store as OBJ:{SUBJ:[predicates]}
//parses each layer accordingly
Object.keys(metadata.predicates).map((obj) => {
Object.keys(metadata.predicates[obj]).map((sbj) => {
if (Array.isArray(metadata.predicates[obj][sbj])) {
metadata.predicates[obj][sbj].map((pred) => {
ops.push({
association: {
input_type: this.removeBioLinkPrefix(sbj),
Expand Down

0 comments on commit 87333a5

Please sign in to comment.