Skip to content

Commit

Permalink
Merge branch 'develop' into feature/DEVSU-2475-update-rapid-report-fi…
Browse files Browse the repository at this point in the history
…lter
  • Loading branch information
bnguyen-bcgsc authored Nov 5, 2024
2 parents 936bec1 + c5e3691 commit 03b02e3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
10 changes: 10 additions & 0 deletions app/models/reports/mutationBurden.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ module.exports = (sequelize, Sq) => {
description: 'somatic indels and SNVs per megabase in the genome',
},
},
svBurdenHidden: {
name: 'svBurdenHidden',
field: 'sv_burden_hidden',
type: Sq.BOOLEAN,
defaultValue: false,
allowNull: false,
jsonSchema: {
description: 'SV Burden Hidden',
},
},
}, {
...DEFAULT_REPORT_OPTIONS,
tableName: 'reports_mutation_burden',
Expand Down
22 changes: 22 additions & 0 deletions migrations/20241021211045-DEVSU-2473-hide-sv-burden-by-default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const TABLE = 'reports_mutation_burden';

module.exports = {
async up(queryInterface, Sq) {
return queryInterface.sequelize.transaction(async (transaction) => {
await queryInterface.addColumn(
TABLE,
'sv_burden_hidden',
{
type: Sq.BOOLEAN,
defaultValue: false,
allowNull: false,
},
{transaction},
);
});
},

async down() {
throw new Error('Not Implemented!');
},
};
2 changes: 1 addition & 1 deletion test/routes/report/mutationBurden.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const mutationBurdenProperties = [
'ident', 'createdAt', 'updatedAt', 'role', 'codingSnvCount', 'truncatingSnvCount',
'codingIndelsCount', 'frameshiftIndelsCount', 'qualitySvCount', 'qualitySvExpressedCount',
'codingSnvPercentile', 'codingIndelPercentile', 'qualitySvPercentile',
'totalSnvCount', 'totalIndelCount', 'totalMutationsPerMb',
'totalSnvCount', 'totalIndelCount', 'totalMutationsPerMb', 'svBurdenHidden',
];

const checkMutationBurden = (mutationObject) => {
Expand Down
9 changes: 6 additions & 3 deletions test/testData/mockReportData.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
"role": "primary",
"totalSnvCount": 120,
"totalIndelCount": 80,
"totalMutationsPerMb": 56.24
"totalMutationsPerMb": 56.24,
"svBurdenHidden": true
},
{
"codingSnvCount": 4,
Expand All @@ -205,7 +206,8 @@
"role": "primary",
"totalSnvCount": 120,
"totalIndelCount": 80,
"totalMutationsPerMb": 56.24
"totalMutationsPerMb": 56.24,
"svBurdenHidden": true
},
{
"codingSnvCount": 4,
Expand All @@ -220,7 +222,8 @@
"role": null,
"totalSnvCount": 120,
"totalIndelCount": 80,
"totalMutationsPerMb": 56.24
"totalMutationsPerMb": 56.24,
"svBurdenHidden": true
}
],
"tmburMutationBurden": {
Expand Down

0 comments on commit 03b02e3

Please sign in to comment.