Skip to content

Commit

Permalink
Merge branch 'develop' into feature/DEVSU-2521-add-post-endpoint-genes
Browse files Browse the repository at this point in the history
  • Loading branch information
bnguyen-bcgsc authored Dec 3, 2024
2 parents d56317c + 3b13380 commit 2656bd9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/models/reports/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ module.exports = (sequelize, Sq) => {
field: 'hrdetect_score',
type: Sq.FLOAT,
},
intersectTmbScore: {
name: 'intersectTmbScore',
field: 'intersect_tmb_score',
genomeTmb: {
name: 'genomeTmb',
field: 'genome_tmb',
type: Sq.FLOAT,
},
alternateIdentifier: {
Expand Down
15 changes: 15 additions & 0 deletions migrations/20241129212739-DEVSU-2513-rename-tbm-score.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const TABLE = 'reports';

module.exports = {
up: (queryInterface) => {
return queryInterface.sequelize.transaction(async (transaction) => {
return Promise.all([
queryInterface.renameColumn(TABLE, 'intersect_tmb_score', 'genome_tmb', {transaction}),
]);
});
},

down: () => {
throw new Error('Not Implemented!');
},
};
2 changes: 1 addition & 1 deletion test/routes/report/report.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const checkReport = (report) => {
'biopsyDate', 'biopsyName', 'presentationDate', 'kbDiseaseMatch',
'kbUrl', 'pediatricIds', 'captiv8Score', 'appendix', 'hrdetectScore',
'legacyReportFilepath', 'legacyPresentationFilepath', 'signatures',
'intersectTmbScore',
'genomeTmb',
].forEach((element) => {
expect(report).toHaveProperty(element);
});
Expand Down
2 changes: 1 addition & 1 deletion test/routes/report/reportAsync.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const checkReport = (report) => {
'state', 'expression_matrix', 'alternateIdentifier', 'ageOfConsent',
'biopsyDate', 'biopsyName', 'presentationDate', 'kbDiseaseMatch',
'kbUrl', 'pediatricIds', 'captiv8Score', 'hrdetectScore', 'appendix',
'intersectTmbScore',
'genomeTmb',
].forEach((element) => {
expect(report).toHaveProperty(element);
});
Expand Down
2 changes: 1 addition & 1 deletion test/testData/mockReportData.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"template": "genomic",
"captiv8Score": 20,
"hrdetectScore": 10.5,
"intersectTmbScore": 9.75,
"genomeTmb": 9.75,
"appendix": "this is an example of an appendix",
"sampleInfo": [
{
Expand Down

0 comments on commit 2656bd9

Please sign in to comment.