Skip to content

Commit

Permalink
Merge pull request #132 from ssi-dk/feat/add-cdiff-columns
Browse files Browse the repository at this point in the history
feat: add cdiff columns to sofi
  • Loading branch information
sjkp authored Dec 12, 2024
2 parents 89fda65 + 50cc006 commit 80acc0d
Show file tree
Hide file tree
Showing 10 changed files with 558 additions and 7 deletions.
7 changes: 7 additions & 0 deletions app/src/app/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ const fieldDisplayNames = {
cgmlst_schema_campylobacter: "cgMLST skema Campylobacter",
cgmlst_schema_listeria: "cgMLST skema Listeria",
cgmlst_schema_klebsiella: "cgMLST skema Klebsiella",
trst: "TRST",
tcda: "tcdA",
tcdb: "tcdB",
cdta_cdtb: "cdtA_cdtB",
del_117: "117del",
a117t: "A117T",
cdiff_details: "Cdiff_details",
} as { [key in keyof AnalysisResult]: string },
};

Expand Down
64 changes: 64 additions & 0 deletions app/src/sap-client/models/AnalysisResultAllOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ export interface AnalysisResultAllOf {
* @memberof AnalysisResultAllOf
*/
date_approved_cluster?: Date;
/**
*
* @type {Date}
* @memberof AnalysisResultAllOf
*/
date_approved_cdiff?: Date;
/**
*
* @type {string}
Expand Down Expand Up @@ -573,6 +579,48 @@ export interface AnalysisResultAllOf {
* @memberof AnalysisResultAllOf
*/
cgmlst_schema_klebsiella?: object;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
trst?: string;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
tcda?: string;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
tcdb?: string;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
cdta_cdtb?: string;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
del_117?: string;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
a117t?: string;
/**
*
* @type {string}
* @memberof AnalysisResultAllOf
*/
cdiff_details?: string;
}

export function AnalysisResultAllOfFromJSON(json: any): AnalysisResultAllOf {
Expand All @@ -587,6 +635,7 @@ export function AnalysisResultAllOfFromJSON(json: any): AnalysisResultAllOf {
'date_approved_st': !exists(json, 'date_approved_st') ? undefined : new Date(json['date_approved_st']),
'date_approved_toxin': !exists(json, 'date_approved_toxin') ? undefined : new Date(json['date_approved_toxin']),
'date_approved_cluster': !exists(json, 'date_approved_cluster') ? undefined : new Date(json['date_approved_cluster']),
'date_approved_cdiff': !exists(json, 'date_approved_cdiff') ? undefined : new Date(json['date_approved_cdiff']),
'qc_provided_species': !exists(json, 'qc_provided_species') ? undefined : json['qc_provided_species'],
'qc_genome1x': !exists(json, 'qc_genome1x') ? undefined : json['qc_genome1x'],
'qc_genome10x': !exists(json, 'qc_genome10x') ? undefined : json['qc_genome10x'],
Expand Down Expand Up @@ -668,6 +717,13 @@ export function AnalysisResultAllOfFromJSON(json: any): AnalysisResultAllOf {
'cgmlst_schema_campylobacter': !exists(json, 'cgmlst_schema_campylobacter') ? undefined : json['cgmlst_schema_campylobacter'],
'cgmlst_schema_listeria': !exists(json, 'cgmlst_schema_listeria') ? undefined : json['cgmlst_schema_listeria'],
'cgmlst_schema_klebsiella': !exists(json, 'cgmlst_schema_klebsiella') ? undefined : json['cgmlst_schema_klebsiella'],
'trst': !exists(json, 'trst') ? undefined : json['trst'],
'tcda': !exists(json, 'tcda') ? undefined : json['tcda'],
'tcdb': !exists(json, 'tcdb') ? undefined : json['tcdb'],
'cdta_cdtb': !exists(json, 'cdta_cdtb') ? undefined : json['cdta_cdtb'],
'del_117': !exists(json, 'del_117') ? undefined : json['del_117'],
'a117t': !exists(json, 'a117t') ? undefined : json['a117t'],
'cdiff_details': !exists(json, 'cdiff_details') ? undefined : json['cdiff_details'],
};
}

Expand All @@ -686,6 +742,7 @@ export function AnalysisResultAllOfToJSON(value?: AnalysisResultAllOf): any {
'date_approved_st': value.date_approved_st === undefined ? undefined : value.date_approved_st.toISOString(),
'date_approved_toxin': value.date_approved_toxin === undefined ? undefined : value.date_approved_toxin.toISOString(),
'date_approved_cluster': value.date_approved_cluster === undefined ? undefined : value.date_approved_cluster.toISOString(),
'date_approved_cdiff': value.date_approved_cdiff === undefined ? undefined : value.date_approved_cdiff.toISOString(),
'qc_provided_species': value.qc_provided_species,
'qc_genome1x': value.qc_genome1x,
'qc_genome10x': value.qc_genome10x,
Expand Down Expand Up @@ -767,6 +824,13 @@ export function AnalysisResultAllOfToJSON(value?: AnalysisResultAllOf): any {
'cgmlst_schema_campylobacter': value.cgmlst_schema_campylobacter,
'cgmlst_schema_listeria': value.cgmlst_schema_listeria,
'cgmlst_schema_klebsiella': value.cgmlst_schema_klebsiella,
'trst': value.trst,
'tcda': value.tcda,
'tcdb': value.tcdb,
'cdta_cdtb': value.cdta_cdtb,
'del_117': value.del_117,
'a117t': value.a117t,
'cdiff_details': value.cdiff_details,
};
}

Expand Down
7 changes: 7 additions & 0 deletions bifrost/bifrost_listener/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ def agg_pipeline(changed_ids=None):
"qc_avg_coverage": "$categories.denovo_assembly.summary.depth",
"qc_num_contigs": "$categories.denovo_assembly.summary.contigs",
"qc_num_reads": "$categories.size_check.summary.num_of_reads",
"trst": "$categories.bifrost_sp_cdiff.summary.TRST",
"tcda": "$categories.bifrost_sp_cdiff.summary.tcdA",
"tcdb": "$categories.bifrost_sp_cdiff.summary.tcdB",
"cdta_cdtb": "$categories.bifrost_sp_cdiff.summary.cdtA/B",
"del117": "$categories.bifrost_sp_cdiff.summary.117del",
"a117t": "$categories.bifrost_sp_cdiff.summary.A117T",
"cdiff_details": "$categories.bifrost_sp_cdiff.summary.tcdA:tcdB:tcdC:cdtA:cdtB",
"qc_main_sp_plus_uncl": removeNullProperty(
{
"$round": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@
"field_name": "date_approved_toxin",
"computed": true
},
{
"field_name": "date_approved_cdiff",
"computed": true
},
{
"field_name": "date_analysis_sofi",
"computed": true
Expand Down
17 changes: 17 additions & 0 deletions openapi_specs/SOFI/SOFI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,9 @@ components:
date_approved_cluster:
type: string
format: date-time
date_approved_cdiff:
type: string
format: date-time
qc_provided_species:
type: string
qc_genome1x:
Expand Down Expand Up @@ -1421,6 +1424,20 @@ components:
type: object
cgmlst_schema_klebsiella:
type: object
trst:
type: string
tcda:
type: string
tcdb:
type: string
cdta_cdtb:
type: string
del_117:
type: string
a117t:
type: string
cdiff_details:
type: string

NewickTreeResponse:
type: object
Expand Down
17 changes: 17 additions & 0 deletions web/openapi_specs/SOFI/SOFI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,9 @@ components:
date_approved_cluster:
type: string
format: date-time
date_approved_cdiff:
type: string
format: date-time
qc_provided_species:
type: string
qc_genome1x:
Expand Down Expand Up @@ -1421,6 +1424,20 @@ components:
type: object
cgmlst_schema_klebsiella:
type: object
trst:
type: string
tcda:
type: string
tcdb:
type: string
cdta_cdtb:
type: string
del_117:
type: string
a117t:
type: string
cdiff_details:
type: string

NewickTreeResponse:
type: object
Expand Down
Loading

0 comments on commit 80acc0d

Please sign in to comment.