Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/DEVSU-2532 Copy number images key update #413

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
1 change: 1 addition & 0 deletions app/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
'scpPlot',
'msi.scatter',
'pathwayAnalysis.legend',
'copyNumber(.*)',
].map((patt) => {
return `(${patt})`;
}).join('|')}$`,
Expand Down
60 changes: 60 additions & 0 deletions app/routes/report/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
];

/**
Expand Down
Loading