Skip to content

Item 10437: Aliquot Field Inheritance #3472

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

Merged
merged 12 commits into from
Jul 7, 2022
Merged

Item 10437: Aliquot Field Inheritance #3472

merged 12 commits into from
Jul 7, 2022

Conversation

XingY
Copy link
Contributor

@XingY XingY commented Jun 22, 2022

Rationale

We are re-enabling "Aliquot Specific" fields for sample types (in apps only). Additionally, support for "Samples & Aliquots" fields that allows independent editing of property fields for parent and child samples is added. Prior to the feature, only "Parent Only" sample properties are supported to force aliquots to always inherit properties from its parent sample.

Related Pull Requests

Changes

  • Modify samples query to support "Samples & Aliquots" fields
  • Modify sample data iterator to account for "Samples & Aliquots" fields
  • Add metrics to count aliquot fields

" exp.PropertyDescriptor D \n" +
" JOIN exp.PropertyDomain PD ON D.propertyId = PD.propertyid\n" +
" JOIN exp.DomainDescriptor DD on PD.domainID = DD.domainId\n" +
"WHERE DD.storageSchemaName = ? AND D.derivationDataScope = ?", SampleTypeDomainKind.PROVISIONED_SCHEMA_NAME, "ChildOnly").getObject(Long.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there constants in Java code for "ChildOnly", etc?

.filter(dp -> !ExpSchema.DerivationDataScopeType.ChildOnly.name().equalsIgnoreCase(dp.getDerivationDataScope()))
.filter(dp -> !ExpMaterialTable.Column.LSID.name().equalsIgnoreCase(dp.getName())
&& !ExpMaterialTable.Column.Name.name().equalsIgnoreCase(dp.getName()))
.filter(dp -> StringUtils.isEmpty(dp.getDerivationDataScope())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a need to do a second pass for filtering or can the second filter's conditions be added to the first filter (slightly more efficient)?

for (Map.Entry<Integer, Map<String, Object>> rowNumSampleRow : sampleRows.entrySet())
{
Integer rowNum = rowNumSampleRow.getKey();
String lsidKey = rowNumLsid.get(rowNum);
Map<String, Object> sampleRow = rowNumSampleRow.getValue();

if (!StringUtils.isEmpty((String) sampleRow.get("AliquotedFromLSID")))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe there should be a constant for the AliquotedFromLSID string. It's used in a few places.

@XingY XingY merged commit 4d9bf63 into develop Jul 7, 2022
@XingY XingY deleted the fb_aliquotOptions branch July 7, 2022 23:51
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