Skip to content

Commit 99d31f4

Browse files
committed
combine with devel patch_bigsamples
Merge branch 'devel' into singleExon_2 # Conflicts: # .github/workflows/check-bioc.yml # README.md
2 parents 59de72c + 29752b8 commit 99d31f4

File tree

7 files changed

+53
-37
lines changed

7 files changed

+53
-37
lines changed

.github/workflows/check-bioc.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,15 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
config:
57+
<<<<<<< HEAD
5758
- { os: ubuntu-latest, r: '4.4', bioc: '3.19', cont: "bioconductor/bioconductor_docker:RELEASE_3_19", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
5859
- { os: macOS-latest, r: '4.4', bioc: '3.19'}
5960
- { os: windows-latest, r: '4.4', bioc: '3.19'}
61+
=======
62+
- { os: ubuntu-latest, r: '4.4.2', bioc: '3.20', cont: "bioconductor/bioconductor_docker:RELEASE_3_20", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
63+
- { os: macOS-latest, r: '4.4.2', bioc: '3.20'}
64+
##- { os: windows-latest, r: '4.3', bioc: '3.18'}
65+
>>>>>>> devel
6066
## Check https://github.com/r-lib/actions/tree/master/examples
6167
## for examples using the http-user-agent
6268
env:
@@ -107,16 +113,16 @@ jobs:
107113
uses: actions/cache@v4
108114
with:
109115
path: ${{ env.R_LIBS_USER }}
110-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE-r-4.3-${{ hashFiles('.github/depends.Rds') }}
111-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE-r-4.3-
116+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE-r-4.4.2-${{ hashFiles('.github/depends.Rds') }}
117+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE-r-4.4.2-
112118

113119
- name: Cache R packages on Linux
114120
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
115121
uses: actions/cache@v4
116122
with:
117123
path: /home/runner/work/_temp/Library
118-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-${{ hashFiles('.github/depends.Rds') }}
119-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-
124+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.4.2-${{ hashFiles('.github/depends.Rds') }}
125+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.4.2-
120126

121127
- name: Install Linux system dependencies
122128
if: runner.os == 'Linux'
@@ -339,7 +345,11 @@ jobs:
339345
if: failure()
340346
uses: actions/upload-artifact@v4
341347
with:
348+
<<<<<<< HEAD
342349
name: ${{ runner.os }}-biocversion-RELEASE-r-4.4-results
350+
=======
351+
name: ${{ runner.os }}-biocversion-RELEASE-r-4.4.2-results
352+
>>>>>>> devel
343353
path: check
344354

345355
- uses: docker/build-push-action@v1

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bambu
22
Type: Package
33
Title: Context-Aware Transcript Quantification from Long Read RNA-Seq data
4-
Version: 3.5.1
4+
Version: 3.9.3
55
Authors@R: c(person("Ying", "Chen", role = c("cre","aut"),
66
email = "[email protected]"),
77
person("Andre", "Sim", role = "aut",

R/bambu-extendAnnotations-utilityCombine.R

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ isore.combineTranscriptCandidates <- function(readClassList,
1717
combinedSplicedTranscripts <-
1818
combineSplicedTranscriptModels(readClassList, bpParameters,
1919
min.readCount, min.readFractionByGene,
20-
min.txScore.multiExon, min.txScore.singleExon, verbose) %>% data.table()
20+
min.txScore.multiExon, min.txScore.singleExon, verbose)
2121
combinedSplicedTranscripts[,confidenceType := "highConfidenceJunctionReads"]
2222
# when single exon min score is greater than 1, skip unspliced transcripts combination
2323
# this is a very customized config, useful when data is very big
@@ -92,40 +92,34 @@ sequentialCombineFeatureTibble <- function(readClassList,
9292

9393
#' @noRd
9494
updateStartEndReadCount <- function(combinedFeatureTibble){
95-
combinedFeatureTibble <- combinedFeatureTibble %>%
96-
mutate(rowID = row_number())
97-
98-
startEndCountTibble <- combinedFeatureTibble %>%
99-
select(rowID, starts_with("start"),starts_with("end"),
100-
starts_with("readCount")) %>%
101-
tidyr::pivot_longer(c(starts_with("start"),starts_with("end"),
102-
starts_with("readCount")), names_to = c(".value","set"),
103-
names_pattern = "(.*)\\.(.)") %>%
104-
group_by(rowID) %>%
105-
mutate(sumReadCount = sum(readCount,na.rm = TRUE))
95+
setDT(combinedFeatureTibble)
96+
combinedFeatureTibble[, rowID := .I]
10697

107-
startTibble <- select(startEndCountTibble, rowID, start, readCount,
108-
sumReadCount) %>%
109-
arrange(start) %>%
110-
filter(cumsum(readCount)/sumReadCount>=0.5) %>%
111-
filter(row_number()==1)
112-
endTibble <- select(startEndCountTibble, rowID, end, readCount,
113-
sumReadCount) %>%
114-
arrange(end) %>%
115-
filter(cumsum(readCount)/sumReadCount>=0.5) %>%
116-
filter(row_number()==1)
98+
colNames <- colnames(combinedFeatureTibble)
99+
readCountCols <- sort(colNames[grep("^readCount", colNames)]) # to make sure it's ordered by sample name
100+
startCols <- sort(colNames[grep("^start", colNames)])
101+
endCols <- sort(colNames[grep("^end", colNames)])
117102

118-
combinedFeatureTibble <- combinedFeatureTibble %>%
119-
dplyr::select(intronStarts, intronEnds, chr, strand, maxTxScore,
120-
maxTxScore.noFit, NSampleReadCount, NSampleReadProp,
121-
NSampleTxScore, rowID) %>%
122-
full_join(select(startTibble, rowID, start), by = "rowID") %>%
123-
full_join(select(endTibble, rowID, end, readCount=sumReadCount),
124-
by = "rowID") %>%
125-
select(-rowID)
103+
startEndDt <- combinedFeatureTibble[,
104+
.(start = readCountWeightedMedian(.SD,x,y),
105+
end = readCountWeightedMedian(.SD,z,y),
106+
readCount = sum(.SD[,y], na.rm = TRUE)),
107+
by = rowID, env = I(list(x = startCols, y = readCountCols,z = endCols))]
108+
109+
combinedFeatureTibble <- startEndDt[combinedFeatureTibble[,.(intronStarts, intronEnds, chr, strand, maxTxScore,
110+
maxTxScore.noFit, NSampleReadCount, NSampleReadProp,
111+
NSampleTxScore, rowID)], on = "rowID"]
112+
combinedFeatureTibble[, rowID := NULL]
126113
return(combinedFeatureTibble)
127114
}
128115

116+
#' Function to get median value without interpolation using certain column names
117+
#' @noRd
118+
readCountWeightedMedian <- function(dt, valuevar, timesvar){
119+
sortVector <- rep(na.omit(unlist(dt[,..valuevar])),
120+
times = as.integer(na.omit(unlist(dt[,..timesvar]))))
121+
return(min(sortVector[sortVector>=quantile(sortVector, probs = 0.5)]))
122+
}
129123

130124

131125
#' Function to combine featureTibble and create the NSample variables

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ metadata(rowRanges(se))$warnings
679679

680680
### Release History
681681

682+
<<<<<<< HEAD
682683
**bambu v3.9.0**
683684

684685
Release date: 2025-xxx-xx
@@ -715,6 +716,17 @@ Minor changes:
715716
- Restore fusion mode functionality and added documentation
716717
- Fixed bug in plot function
717718
- Update release history
719+
=======
720+
**bambu v3.8.2**
721+
722+
Release date: 2025-02-06
723+
724+
Minor changes:
725+
726+
- Fix large number of samples [issue](https://github.com/GoekeLab/bambu/issues/450)
727+
- Fix denovo bug issue
728+
729+
>>>>>>> devel
718730
719731
**bambu v3.2.5**
720732

Binary file not shown.
Binary file not shown.

tests/testthat/test_isore.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ test_that("isore.combineTranscriptCandidates completes successfully", {
7171

7272
expect_equal(seIsoReCombined, seIsoReCombinedExpected)
7373
expect_named(seIsoReCombined,
74-
c('intronStarts', 'intronEnds', 'chr', 'strand', 'maxTxScore', 'maxTxScore.noFit',
75-
'NSampleReadCount', 'NSampleReadProp', 'NSampleTxScore', 'start', 'end', 'readCount', 'confidenceType')
74+
c('start', 'end', 'readCount','intronStarts', 'intronEnds', 'chr', 'strand', 'maxTxScore', 'maxTxScore.noFit',
75+
'NSampleReadCount', 'NSampleReadProp', 'NSampleTxScore', 'confidenceType')
7676
)
7777
})
7878

0 commit comments

Comments
 (0)