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

Add missing study view filters for clinical data binning #11007

Merged

Conversation

onursumer
Copy link
Member

This is to fix a legacy issue where certain study view filters could be ignored when applying filters for clinical data binning

@@ -246,9 +246,16 @@ public boolean shouldSkipFilterForClinicalDataBins(StudyViewFilter filter) {
return (
filter != null &&
filter.getClinicalDataFilters() == null &&
filter.getClinicalEventFilters() == null &&

Choose a reason for hiding this comment

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

What do you think if we write this huge null checking like this?

return filter != null && 
       Stream.of(
           filter.getClinicalDataFilters(),
           filter.getClinicalEventFilters(),
           filter.getMutationDataFilters(),
           filter.getStructuralVariantFilters(),
           filter.getGeneFilters(),
           filter.getSampleTreatmentFilters(),
           filter.getPatientTreatmentFilters(),
           filter.getPatientTreatmentGroupFilters(),
           filter.getSampleTreatmentGroupFilters(),
           filter.getPatientTreatmentTargetFilters(),
           filter.getSampleTreatmentTargetFilters(),
           filter.getGenomicProfiles(),
           filter.getGenomicDataFilters(),
           filter.getGenericAssayDataFilters(),
           filter.getCaseLists(),
           filter.getCustomDataFilters()
       ).allMatch(Objects::isNull);

@alisman alisman merged commit f545673 into cBioPortal:master Sep 23, 2024
10 of 13 checks passed
@dippindots dippindots added the bug label Sep 24, 2024
@onursumer onursumer deleted the fix-clinical-data-bin-filter-skip branch October 7, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants