Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
haynescd committed Sep 27, 2024
1 parent 07bcfb2 commit bad9a2b
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,16 @@ private < T extends AlterationCountByGene> List<T> populateAlterationCounts(@Non
return alterationCounts;
}

/**
* Combines alteration counts by Hugo gene symbols. If multiple entries exist for the same
* gene symbol, their number of altered cases and total counts are summed up. Returns a
* list of unique AlterationCountByGene objects where each gene symbol is represented only once.
*
* This appears in the Data where Genes have similar Hugo Gene Symbols but different Entrez Ids
*
* @param alterationCounts List of AlterationCountByGene objects, potentially with duplicate gene symbols
* @return List of AlterationCountByGene objects with unique gene symbols and combined counts
*/
private List<AlterationCountByGene> combineAlterationCountsWithConflictingHugoSymbols(@NonNull List<AlterationCountByGene> alterationCounts) {
Map<String, AlterationCountByGene> alterationCountByGeneMap = new HashMap<>();
for (var alterationCount : alterationCounts) {
Expand All @@ -308,7 +318,17 @@ private List<AlterationCountByGene> combineAlterationCountsWithConflictingHugoSy
return alterationCountByGeneMap.values().stream().toList();
}


/**
* Combines alteration counts by Hugo gene symbols. If multiple entries exist for the same
* gene symbol, their number of altered cases and total counts are summed up. Returns a
* list of unique AlterationCountByGene objects where each gene symbol is represented only once.
*
* This appears in the Data where Genes have similar Hugo Gene Symbols but different Entrez Ids.
* This is a special case to handle Copy Number Mutations where the Alteration type should be a part of the key
*
* @param alterationCounts List of CopyNumberCountByGene objects, potentially with duplicate gene symbols
* @return List of AlterationCountByGene objects with unique gene symbols and combined counts
*/
private List<CopyNumberCountByGene> combineCopyNumberCountsWithConflictingHugoSymbols(@NonNull List<CopyNumberCountByGene> alterationCounts) {
Map<Pair<String, Integer>, CopyNumberCountByGene> alterationCountByGeneMap = new HashMap<>();
for (var alterationCount : alterationCounts) {
Expand Down

0 comments on commit bad9a2b

Please sign in to comment.