Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
14f5547
tidy up code
lingminhao Feb 15, 2026
d63fdae
refactor generateColData to take sampleData as argument
lingminhao Feb 15, 2026
f86ce9c
refactor combineCountSes to inherit colData directly from quantData
lingminhao Feb 15, 2026
ed26b1f
update colData for pseudobulk single-cell
lingminhao Feb 15, 2026
f9554b5
add sampleData argument
lingminhao Feb 15, 2026
0307855
remove spatial argument from bambu
lingminhao Feb 19, 2026
8e25154
rename colData parameter combineCountSes to colDataList (avoid same …
lingminhao Feb 19, 2026
c29eab4
update bambu sampleData parameter description
lingminhao Feb 19, 2026
bfa131e
refine sampleData input check description
lingminhao Feb 19, 2026
9c2d8ba
tidy up spatial & sampleData argument
lingminhao Feb 20, 2026
fda300b
change sampleData to sampleMetadata in assignReadClasstoTranscripts f…
lingminhao Feb 20, 2026
e80cb39
fix bug: omit the check for NA elements in sampleData
lingminhao Feb 20, 2026
7d60435
allow . csv/.tsv/.txt file input type in sampleData
lingminhao Mar 2, 2026
8f7f506
refactor: store sampleData in readClassList for parsing
lingminhao Mar 27, 2026
547e034
update comment to describe CB/UMI parsing from bam
lingminhao Mar 27, 2026
586cdb3
change priority in CB & UMI name extraction from bam file
lingminhao Mar 27, 2026
4bd48bf
fix: standardize list access for all sample sizes
lingminhao Mar 27, 2026
807ad06
remove redundant code
lingminhao Mar 27, 2026
44e791d
correct order of extracted barcode to match devel_pre_v4
lingminhao Apr 9, 2026
446407a
tidy for cleaner code
lingminhao Apr 9, 2026
93b2e7d
add back row.names to prevent missing colnames in se_pseudobulk
lingminhao Apr 9, 2026
01f4ff8
correct order of extracted barcode to match devel_pre_v4
lingminhao Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove spatial argument from bambu
  • Loading branch information
lingminhao committed Feb 19, 2026
commit 03078553b0b6301cafd4bae5990ae96e006d19c8
2 changes: 1 addition & 1 deletion R/bambu-assignDist.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @import data.table
#' @noRd
assignReadClasstoTranscripts <- function(readClassList, annotations, isoreParameters,
verbose, sampleData, demultiplexed, spatial,
verbose, sampleData, demultiplexed,
returnDistTable = FALSE, trackReads = TRUE) {
Comment thread
lingminhao marked this conversation as resolved.
if (is.character(readClassList)) readClassList <- readRDS(file = readClassList)
metadata(readClassList)$readClassDist <- calculateDistTable(readClassList, annotations, isoreParameters, verbose, returnDistTable)
Expand Down
3 changes: 1 addition & 2 deletions R/bambu.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
annotations <- checkInputs(annotations, reads,
readClass.outputDir = rcOutDir,
genomeSequence = genome, discovery = discovery,
sampleNames = sampleNames, spatial = spatial,quantData = quantData)
sampleNames = sampleNames, sampleData = sampleData, quantData = quantData)
}
isoreParameters <- setIsoreParameters(isoreParameters = opt.discovery)
#below line is to be compatible with earlier version of running bambu
Expand Down Expand Up @@ -243,7 +243,6 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
# for bulk data, there is one sampleData (keep sampleData[1]), for single-cell, there is one per sample
sampleData = if(length(sampleData) == 1) sampleData[1] else sampleData[i],
demultiplexed = demultiplexed,
Comment thread
lingminhao marked this conversation as resolved.
spatial = spatial,
returnDistTable = returnDistTable,
trackReads = trackReads
)
Expand Down
14 changes: 7 additions & 7 deletions R/bambu_utilityFunctions.R
Comment thread
lingminhao marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ updateParameters <- function(Parameters, Parameters.default) {
#' @importFrom methods is
#' @noRd
checkInputs <- function(annotations, reads, readClass.outputDir, genomeSequence,
discovery, sampleNames, spatial, quantData){
Comment thread
lingminhao marked this conversation as resolved.
discovery, sampleNames, quantData){
# ===# Check annotation inputs #===#
if (!is.null(annotations)) {
if (is(annotations, "CompressedGRangesList")) {
Expand Down Expand Up @@ -156,12 +156,12 @@ checkInputs <- function(annotations, reads, readClass.outputDir, genomeSequence,
}
}

if(!is.null(spatial)){
#if(!all(grepl(".tsv^", spatial))){stop("Not all paths for spatial are .tsv files")}
if(length(spatial)==1 & length(reads)>1){
warning("Using the same whitelist and coordinates for all input samples")
} else if(length(reads)!=length(spatial)){
stop("There are not the same number spatial whitelist paths as input files to reads. ",
if(!is.null(sampleData)){
if(!all(grepl(".csv^", sampleData))){stop("Not all paths for sample metadata files are .csv files")}
Comment thread
lingminhao marked this conversation as resolved.
Outdated
if(length(sampleData)==1 & length(reads)>1){
warning("Using the same sample metadata file for all input samples")
} else if(length(reads)!=length(sampleData)){
stop("There are not the same number sample metadata files paths as input files to reads. ",
"Make sure these two arguments are vectors of the same length")
}
}
Expand Down
Loading