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

Issue 51432: special character cause aliquot rollup and assay transform script to work unexpectedly #6125

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

XingY
Copy link
Contributor

@XingY XingY commented Dec 4, 2024

Rationale

The app quotes parent names that contains comma, including any data/material parents or aliquot parent names. The AliquotRollupDataIterator is fetching parent specified by aliquotedFrom as is, which might contain enclosing quotes, which resulted in parent sample not found and rollup skipped.

Separately, PlateSamplesTest.testAssayImportWithTransformScript fails to transform and import data when well sample name contains double quote. The PR fixed the intermediate tsv file that LKS writes so the transfom script can work on the correct file. The other part of the problem is transcript script itself (for example, R) might not know how to property quote values when writing files back to LKS, which this PR doesn't address.

Related Pull Requests

Changes

  • refactor the parentName extraction util from DerivationDataIterator and re-use for AliquotRollupDataIterator
  • quoteValue when writing tsv file for transform scripts

@XingY XingY requested a review from labkey-susanh December 5, 2024 23:51
@XingY XingY changed the title Issue 51432: aliquot rollup is not working for parent samples that contains comma in sample names Issue 51432: special character cause aliquot rollup and assay transform script to work unexpectedly Dec 5, 2024
.filter(s -> !StringUtils.isEmpty(s))
.toList();
if (!parents.isEmpty())
return parents.get(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have more than one parent after all this work, should that throw or log an error or warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. updated

.map(String::trim)
.map(s -> Pair.of(parentColName, s))
.collect(Collectors.toSet());
if (parentNames != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like parentNames can't actually be null here.

@XingY XingY merged commit 993073c into develop Dec 9, 2024
7 checks passed
@XingY XingY deleted the fb_issue51432 branch December 9, 2024 16:57
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

Successfully merging this pull request may close these issues.

2 participants