-
Notifications
You must be signed in to change notification settings - Fork 507
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
Mutation data counts #10395
Mutation data counts #10395
Conversation
List<MutationDataFilter> mutationDataFilters = studyViewFilter.getMutationDataFilters(); | ||
|
||
if (!CollectionUtils.isEmpty(mutationDataFilters)) { | ||
mutationDataFilters.forEach(mutationDataFilter -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use stream groupingBy lambda function
}); | ||
} | ||
|
||
if (!CollectionUtils.isEmpty(mutationOptionDataFilters)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same logic at line 317. Why not send complete mutationDataFilters
and do the grouping logic there?
}; | ||
|
||
FourParameterFunction<List<String>, List<String>, List<String>, String, List<ClinicalData>> fetchMutatedData = ( | ||
mappedProfileIds, mappedSampleIds, stableIds, attributeId) -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is same as what is at line 789
@@ -932,7 +936,79 @@ private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinica | |||
List<String> sampleIds = new ArrayList<>(); | |||
studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds); | |||
|
|||
if (dataFilters.get(0) instanceof GenomicDataFilter) { | |||
if (dataFilters.get(0) instanceof MutationDataFilter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to refactor/optimize logic in the block?
web/src/main/java/org/cbioportal/web/parameter/MutationDataFilter.java
Outdated
Show resolved
Hide resolved
}); | ||
} | ||
// add case identifiers for all molecular profiles | ||
int finalI = i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this logic updated?
model/src/main/java/org/cbioportal/model/MutationGeneFilter.java
Outdated
Show resolved
Hide resolved
Overall this looks like the PR would work, my big question is could any of these lambda function be more efficiently done with a new SQL query? It seems like we are doing a lot of work with the results. |
5a2f880
to
4b9d713
Compare
@JREastonMarks I've pushed some updates in https://github.com/cBioPortal/cbioportal/pull/10395/files#diff-afa1b11beff812038dd42375fe08a4d1990f7c5630d58e2d12a853dcb67b5d36. The refactor changes include moving java logic back to sql mapper, simplifying workloads in StudyViewController and StudyViewServiceImpl. Feel free to check it out. Let me know if anything missing! Thanks again for the suggestion. |
81fb55e
to
0c93591
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs 0.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 0.0% Coverage The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
@h164654156465 Just an FYI that we have repackaged our code base. You should be able to merge this branch into your code base without any difficulty. Mostly this involved moving code around so: |
…alDataFilter bugs
6a37817
to
9afcbb5
Compare
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 48 New issues |
Hi @7xuanlu , Thanks |
Hi @JREastonMarks , I've migrated this PR over to #10559. Let's work from there, thanks! |
PR for cBioPortal/icebox#568