Skip to content

Commit

Permalink
Merge pull request #413 from bcgsc/feat/DEVSU-2532-copy-number-image-…
Browse files Browse the repository at this point in the history
…keys-update

feature/DEVSU-2532 Copy number images key update
Nithriel authored Jan 7, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 2701af1 + 7416060 commit 90e990b
Showing 3 changed files with 69 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -152,6 +152,14 @@ sequence by running this SQL command after the insert:
Otherwise, you will get a unique constraint error when inserting via the API because Sequelize will try use an id
that is now taken.

## Adding new image types

Steps to add a new image type:
1. Open file app/routes/report/images.js
2. Add new object to IMAGES_CONFIG. Pattern will be the regex for the image key being uploaded
3. Open file app/constants.js
4. Add new entry to VALID_IMAGE_KEY_PATTERN based on the IMAGES_CONFIG pattern

## Process Manager

The production installation of IPR is run & managed by [pm2](http://pm2.keymetrics.io/)
1 change: 1 addition & 0 deletions app/constants.js
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ module.exports = {
'scpPlot',
'msi.scatter',
'pathwayAnalysis.legend',
'copyNumber(.*)',
].map((patt) => {
return `(${patt})`;
}).join('|')}$`,
60 changes: 60 additions & 0 deletions app/routes/report/images.js
Original file line number Diff line number Diff line change
@@ -176,6 +176,66 @@ const IMAGES_CONFIG = [
height: 450,
format: 'PNG',
},
{
pattern: 'copyNumberChr(1|2)',
width: 1625,
height: 875,
format: 'PNG',
},
{
pattern: 'copyNumberChr(3|4|5)',
width: 1300,
height: 875,
format: 'PNG',
},
{
pattern: 'copyNumberChr(6|7|X)',
width: 1150,
height: 875,
format: 'PNG',
},
{
pattern: 'copyNumberChr(8|9)',
width: 1100,
height: 875,
format: 'PNG',
},
{
pattern: 'copyNumberChr(10|11|12|13|14)',
width: 1000,
height: 1000,
format: 'PNG',
},
{
pattern: 'copyNumberChr15',
width: 1000,
height: 1150,
format: 'PNG',
},
{
pattern: 'copyNumberChr(16|17|18)',
width: 900,
height: 1150,
format: 'PNG',
},
{
pattern: 'copyNumberChr(19|20|Y)',
width: 700,
height: 1150,
format: 'PNG',
},
{
pattern: 'copyNumberChr(21|22)',
width: 550,
height: 1150,
format: 'PNG',
},
{
pattern: 'copyNumberLegend',
width: 300,
height: 1150,
format: 'PNG',
},
];

/**

0 comments on commit 90e990b

Please sign in to comment.