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 / marker names which are numbers are being converted to numeric type instead of string #404

Open
3 tasks
Don-Isdale opened this issue Jul 10, 2024 · 0 comments
Assignees

Comments

@Don-Isdale
Copy link
Collaborator

Don-Isdale commented Jul 10, 2024

Introduction

The following evidence suggests that marker names uploaded in spreadsheets are being converted to numbers, and this is causing problems in matching QTL Flanking Markers to the parent dataset, and in aligning paths between datasets. It may be that the marker names are being converted to numbers in the parent and not in the child dataset.

Test Evidence and Required Changes

While uploading a QTL dataset via a spreadsheet, it is getting this error (in network tab, in Pretzel it says [object Object]):
Error: X : Dataset name "X "error : Block 5H Feature F Flanking Markers N are not in parent P name 5H

  • ensure this error is displayed in the GUI

After deleting the QTL which was defining a single SNP, where the error was coming from, the upload then worked, but no paths are displayed when expected.
(for example, marker name N2 which worked previously)

(note : X, P are dataset names, F is a feature name, N and N2 are marker numbers)

vendor-cb6ea279aadda3faa80311bb4c32d111.js:1979 Uncaught TypeError: e.match is not a function
    at e.featureNameClass (pretzel-frontend-441133ffab17e3f19a7ba70aaae17cdd.js:6054:187)
    at Object.featureEltId (pretzel-frontend-441133ffab17e3f19a7ba70aaae17cdd.js:6296:32)
  • check the type conversion of numbers in spreadsheet upload - this should not apply to the name field.

  • in featureNameClass(), handle name being of type other than 'string', e.g. 'number'.
    This function assumes that name is a string (possibly a string of numbers) :

 frontend/app/utils/draw/stacksAxes.js :
...
function featureNameClass(name)
...
  if (name.match(/[0-9]/))

@Don-Isdale Don-Isdale self-assigned this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant