Skip to content

Commit

Permalink
Merge pull request #131 from ssi-dk/ejl/impl-resfinderFeedback
Browse files Browse the repository at this point in the history
Ejl/impl resfinder feedback
  • Loading branch information
sjkp authored Dec 12, 2024
2 parents 937893f + cbe4e0e commit 89fda65
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions bifrost/bifrost_listener/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def removeNullProperty(expr):
- Virulence_genes
- Adheasion_final
- Toxin_final
- AMR_profile
- QC_cgMLST%
- cgMLST skema Salmonella
- cgMLST skema E. coli
Expand Down Expand Up @@ -93,12 +92,25 @@ def agg_pipeline(changed_ids=None):
}
},
"resistance_genes": {
"$concat": [
"$categories.resistance.summary.genes"
+ " "
+ "$categories.resistance.summary.point_mutations"
]
"$reduce": {
"input": {
"$map": {
"input": {"$objectToArray": "$categories.resistance.report.phenotypes"},
"as": "phenotype",
"in": {
"$reduce": {
"input": {"$objectToArray": "$$phenotype.v.genes"},
"initialValue": "",
"in": {"$concat": ["$$value", {"$cond": [{"$eq": ["$$value", ""]}, "", ", "]}, "$$this.k"]}
}
}
}
},
"initialValue": "",
"in": {"$concat": ["$$value", {"$cond": [{"$eq": ["$$value", ""]}, "", ", "]}, "$$this"]}
}
},
"amr_profile": "$categories.resistance.summary",
"resistance": "$categories.resistance",
"resfinder_version": "$categories.resistance.resfinder_version",
"sero_enterobase": "$categories.serotype.report.enterobase_serotype1",
Expand Down

0 comments on commit 89fda65

Please sign in to comment.