Skip to content

Commit

Permalink
Merge pull request #2170 from opencb/TASK-2111
Browse files Browse the repository at this point in the history
TASK-2111
  • Loading branch information
pfurio authored Oct 21, 2022
2 parents 53f87fc + 93abb23 commit 7af05be
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,16 @@ public int getNumCompHetIds() {
}

public int getNumPairedCompHetIds() {
int threshold = 250;
Set<String> chPairs = new HashSet<>();
for (Set<String> chSet : transcriptCompHetIdsMap.values()) {
for (Map.Entry<String, Set<String>> entry : transcriptCompHetIdsMap.entrySet()) {
Set<String> chSet = entry.getValue();
if (chSet.size() > 1) {
if (chSet.size() > 150) {
// Don't calculate this if the number of possible pairs is bigger than 1000
return -1000;
if (chSet.size() > threshold) {
logger.warn("Showing a -1000 value for the numPairedCompHet stats. More than {} COMP_HET variants found in"
+ " transcript {}", threshold, entry.getKey());
// Don't calculate this if the number of possible pairs is too big
return -1;
}
ArrayList<String> chList = new ArrayList<>(chSet);
for (int i = 0; i < chList.size() - 1; i++) {
Expand Down

0 comments on commit 7af05be

Please sign in to comment.