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

Temporary fix for DMP #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions api/controllers/UploadController.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,16 @@ exports.grid = [
let formValues = req.body;
let material = formValues.material;
let application = reverseReadableRecipesLib[formValues.application];

if (formValues.application.includes('_') || formValues.application ==='ATAC' || formValues.application === 'PEDPEG') {
application = formValues.application;
}

let cleanedMaterial = material;
// clean up from DMP material choices i.e. DNA (DMP Sample ID only)
if (material.includes('(')) {
cleanedMaterial = 'DNA';
}

let columnsPromise = cache.get(`${material}-${application}-Columns`, () => services.getColumns(cleanedMaterial, application));
Promise.all([columnsPromise])
.then((results) => {
Expand Down
4 changes: 4 additions & 0 deletions api/util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,10 @@ export function submit(submission, user, transactionId) {
return new Promise((resolve, reject) => {
let serviceId = submission.formValues.serviceId;
let recipe = reverseReadableRecipesLib[submission.formValues.application];

if (submission.formValues.application.includes('_') || submission.formValues.application ==='ATAC' || submission.formValues.application === 'PEDPEG') {
recipe = submission.formValues.application;
}
let capturePanel = submission.formValues.capturePanel;
let sampleType = submission.formValues.material;
let seqReadLength = submission.formValues.sequencingReadLength || '';
Expand Down