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

Demo rfc80 poc mutation&genomic data count unit tests #10961

Conversation

fuzhaoyuan
Copy link
Contributor

Fix rfc80-team#38 and rfc80-team#43

Describe changes proposed in this pull request:

  • Use Charles's implementation for mutated count and profiled count

Copy link

sonarcloud bot commented Aug 28, 2024

@@ -133,15 +133,19 @@ public List<GenomicDataCountItem> getCNACountsByGeneSpecific(StudyViewFilter stu
@Override
public List<GenomicDataCountItem> getMutationCountsByGeneSpecific(StudyViewFilter studyViewFilter, List<GenomicDataFilter> genomicDataFilters) {
List<GenomicDataCountItem> genomicDataCountItemList = new ArrayList<>();
int totalCount = studyViewRepository.getFilteredSamplesCount(createContext(studyViewFilter));
List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getMutatedGenes(createContext(studyViewFilter));
Copy link
Contributor

Choose a reason for hiding this comment

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

@fuzhaoyuan (@haynescd) if I understand correctly this PR switches from using it's own query (via the old getMututionCounts method of the repository) to just leveraging the getMutatedGenes method that was built for the mutated_genes endpoint. This is slightly painful because it means we're calling this thing at least twice for every filtering operation in the study view. I wonder if we could adapt getMutatedGenes so that it could take an optional gene parameter and then query only that, which would have massive savings.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately the same could be said for getFilteredSamplesCount. The study view is already calling that once. @haynescd this is probably too ambitious for this phase, but the solution for this redundancy would be a global cache of promises where the keys are hashes of the studyview filters. That way, we can fire off all these requests (endpoints) at the same time and whoever is first kicks off a given filtering operation and subsequent consumers just subscribe to that cached promise.

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