Skip to content

Commit b75e95d

Browse files
author
Chen Ying
authored
Merge pull request #519 from GoekeLab/xgboost_bug_fix_for_v4
Xgboost bug fix for v4
2 parents 8ca8e90 + f2a625f commit b75e95d

20 files changed

Lines changed: 16287 additions & 16164 deletions

R/bambu-processReads_scoreReadClasses.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ prepareTranscriptModelFeatures = function(rowData){
294294
tx_strand_bias = readCount.posStrand, labels = equal) %>%
295295
mutate(
296296
tx_strand_bias=(1-abs(0.5-(tx_strand_bias/numReads))),
297+
labels = as.logical(labels),
297298
numReads = log2(pmax(1,1+(numReads/scalingFactor)))
298299
)
299300
return(outData)

R/bambu-processReads_utilityJunctionErrorCorrection.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ testSpliceSites <- function(data, splice = "Start", prime = "start",
9292
predSplice.prime <- NULL
9393
if (is.null(junctionModel)) {
9494
model = fitXGBoostModel(labels.train =
95-
as.integer(annotatedSplice)[mySet.all][mySet.training],
95+
as.logical(annotatedSplice)[mySet.all][mySet.training],
9696
data.train = modelmatrix[mySet.training,],
9797
show.cv = verbose, maxSize.cv = 10000)
9898

R/sysdata.rda

-31 Bytes
Binary file not shown.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,17 @@ metadata(rowRanges(se))$warnings
685685

686686
### Release History
687687

688+
**bambu v3.13.1**
689+
690+
Release date: 2026-01-14
691+
692+
Minor changes:
693+
694+
- Resolve xgboost object incompatibility error [issue](https://github.com/GoekeLab/bambu/issues/447)
695+
- Resolve process.y.margin.and.object error [issue](https://github.com/GoekeLab/bambu/issues/505)
696+
- Resolve xgboost warnings related to argument updates in the recent xgboost version
697+
- Resolve the dplyr warning related to summarise usage [issue](https://github.com/GoekeLab/bambu/issues/380)
698+
688699

689700
**bambu v3.8.2**
690701

data-raw/DATASET.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# fitXGBoostModel() in test_xgboost.R
55
data_train <- matrix(seq(1:300000), nrow=100000)
66
data_test <- matrix(c(seq(1:28000), seq(280001:300000)), nrow=16000)
7-
labels_train <- c(rep(1,50000), rep(0,50000))
7+
labels_train <- as.logical(c(rep(1,50000), rep(0,50000)))
88
xgb_model <- fitXGBoostModel(labels_train, data_train, show.cv=TRUE)
99
# Extract the predictions and results from the list
1010
xgb_predictions = predict(xgb_model, data_test)
@@ -110,14 +110,14 @@ seCombinedExtendedGeneExpected <- transcriptToGeneExpression(seCombinedExtended)
110110
## prior models to use for scoreReadClass() and junctions()
111111
##to train new ones see update_xgboost_models.R
112112
defaultModels = readRDS("./inst/extdata/defaultModels.rds")
113-
defaultModels$transcriptModelME = xgb.load("./inst/extdata/read_class_ME.model")
114-
defaultModels$transcriptModelSE = xgb.load("./inst/extdata/read_class_SE.model")
113+
defaultModels$transcriptModelME = xgb.load("./inst/extdata/read_class_ME.ubj")
114+
defaultModels$transcriptModelSE = xgb.load("./inst/extdata/read_class_SE.ubj")
115115

116116
standardJunctionModels_temp = list()
117-
standardJunctionModels_temp$spliceSitePredictionStart.start = xgb.load("./inst/extdata/spliceSitePredictionStart.start.model")
118-
standardJunctionModels_temp$spliceSitePredictionStart.end = xgb.load("./inst/extdata/spliceSitePredictionStart.end.model")
119-
standardJunctionModels_temp$spliceSitePredictionEnd.start = xgb.load("./inst/extdata/spliceSitePredictionEnd.start.model")
120-
standardJunctionModels_temp$spliceSitePredictionEnd.end = xgb.load("./inst/extdata/spliceSitePredictionEnd.end.model")
117+
standardJunctionModels_temp$spliceSitePredictionStart.start = xgb.load("./inst/extdata/model_spliceSitePredictionStart.start.ubj")
118+
standardJunctionModels_temp$spliceSitePredictionStart.end = xgb.load("./inst/extdata/model_spliceSitePredictionStart.end.ubj")
119+
standardJunctionModels_temp$spliceSitePredictionEnd.start = xgb.load("./inst/extdata/model_spliceSitePredictionEnd.start.ubj")
120+
standardJunctionModels_temp$spliceSitePredictionEnd.end = xgb.load("./inst/extdata/model_spliceSitePredictionEnd.end.ubj")
121121

122122
usethis::use_data(data1, data2, data3, data4, data5,
123123
estOutput_woBC,
127 KB
Binary file not shown.
130 KB
Binary file not shown.
128 KB
Binary file not shown.
119 KB
Binary file not shown.

inst/extdata/read_class_ME.model

-172 KB
Binary file not shown.

0 commit comments

Comments
 (0)