Skip to content

Commit

Permalink
Fix quantification when running bulk
Browse files Browse the repository at this point in the history
  • Loading branch information
andredsim committed Nov 5, 2024
1 parent 99d3148 commit a605fe7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/bambu-processReads.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ bambu.processReads <- function(reads, annotations, genomeSequence,
mcols(readGrgList[[i]])$BC = paste0(names(reads)[i], '_', mcols(readGrgList[[i]])$BC)
} else{mcols(readGrgList[[i]])$BC = sampleNames[i]}
mcols(readGrgList[[i]])$BC = as.factor(mcols(readGrgList[[i]])$BC)
if(!isFALSE(demultiplexed)){
mcols(readGrgList[[i]])$sampleID = as.numeric(mcols(readGrgList[[i]])$BC)
} else {mcols(readGrgList[[i]])$sampleID = i}
}
readGrgList = do.call(c, readGrgList)
mcols(readGrgList)$id <- seq_along(readGrgList)
if(!isFALSE(demultiplexed)){
mcols(readGrgList)$sampleID = as.numeric(mcols(readGrgList)$BC)
} else {mcols(readGrgList)$sampleID = mcols(readGrgList)$BC}
readClassList <- constructReadClasses(readGrgList, genomeSequence = genomeSequence,annotations = annotations,
readClass.outputDir = readClass.outputDir,
stranded = stranded, min.readCount = min.readCount,
Expand Down Expand Up @@ -184,7 +184,7 @@ bambu.processReadsByFile <- function(bam.file, genomeSequence, annotations,
mcols(readGrgList)$BC = as.factor(mcols(readGrgList)$BC)
if(!isFALSE(demultiplexed)){
mcols(readGrgList)$sampleID = as.numeric(mcols(readGrgList)$BC)
} else {mcols(readGrgList)$sampleID = mcols(readGrgList)$BC}
} else {mcols(readGrgList)$sampleID = index}

# construct read classes for each chromosome seperately
se <- lowMemoryConstructReadClasses(readGrgList, genomeSequence,
Expand Down

0 comments on commit a605fe7

Please sign in to comment.