Skip to content

Commit

Permalink
Merge pull request #389 from GoekeLab/restore_fusion_function
Browse files Browse the repository at this point in the history
Don't compress gene assignments before fusion assignment
  • Loading branch information
andredsim authored Oct 25, 2024
2 parents a79725b + ae3ba44 commit ab68c3f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/bambu-processReads_utilityConstructReadClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -450,16 +450,13 @@ assignGeneIdsByReference <- function(grl, annotations, min.exonOverlap = 10,
ranges(geneRanges[subjectHits(ov)[multiHits]]))
filteredMultiHits = data.frame(queryHits = queryHits(ov)[multiHits],
intersectWidth = sum(width(rangeIntersect)),
subjectHits = subjectHits(ov)[multiHits]) %>%
group_by(queryHits) %>% summarise(subjectHits = subjectHits[which.max(intersectWidth)],
intersectWidth = max(intersectWidth))
subjectHits = subjectHits(ov)[multiHits])
if(fusionMode) {
filteredMultiHits <- filteredMultiHits %>%
filter(intersectWidth>min.exonOverlap) %>%
mutate(geneid = names(geneRanges)[subjectHits]) %>% distinct() %>%
group_by(queryHits) %>% summarise(geneid = paste(geneid, collapse=':'))
geneIds[filteredMultiHits$queryHits] <- filteredMultiHits$geneid

} else {
filteredMultiHits <- filteredMultiHits %>%
group_by(queryHits) %>% arrange(desc(intersectWidth)) %>%
Expand Down

0 comments on commit ab68c3f

Please sign in to comment.