Skip to content

Commit 212449e

Browse files
committed
load report dataType from seqQC
1 parent 819a3de commit 212449e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

app/routes/report/report.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,14 @@ router.route('/')
381381
req.body.sampleInfo = cleanSampleInfo;
382382
}
383383

384+
if (req.body.seqQC) {
385+
req.body.dataType = req.body.seqQC.filter(
386+
(item) => {return item.Sample?.startsWith('Tumour');},
387+
).map(
388+
(item) => {return item.Sample.replace(/^Tumour\s+/i, '');},
389+
).join(', ');
390+
}
391+
384392
try {
385393
// eslint-disable-next-line camelcase
386394
if (ignore_extra_fields) {

app/routes/report/reportAsync.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ router.route('/')
4343
req.body.sampleInfo = cleanSampleInfo;
4444
}
4545

46+
if (req.body.seqQC) {
47+
req.body.dataType = req.body.seqQC.filter(
48+
(item) => {return item.Sample?.startsWith('Tumour');},
49+
).map(
50+
(item) => {return item.Sample.replace(/^Tumour\s+/i, '');},
51+
).join(', ');
52+
}
53+
4654
try {
4755
// eslint-disable-next-line camelcase
4856
if (ignore_extra_fields) {

0 commit comments

Comments
 (0)