@@ -191,11 +191,11 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
191191 genomeSequence = genome , discovery = discovery ,
192192 sampleNames = sampleNames , sampleData = sampleData , quantData = quantData )
193193 }
194- isoreParameters <- setIsoreParameters( isoreParameters = opt.discovery )
194+ opt.discovery <- setDiscoveryParameters( discoveryParameters = opt.discovery )
195195 # below line is to be compatible with earlier version of running bambu
196- if (! is.null(isoreParameters $ max.txNDR )) NDR = isoreParameters $ max.txNDR
197- rcAssignmentParameters <- setRcAssignmentParameters(rcAssignmentParameters = opt.rcAssignment )
198- emParameters <- setEmParameters(emParameters = opt.em )
196+ if (! is.null(opt.discovery $ max.txNDR )) NDR = opt.discovery $ max.txNDR
197+ opt.rcAssignment <- setRcAssignmentParameters(rcAssignmentParameters = opt.rcAssignment )
198+ opt.em <- setEmParameters(emParameters = opt.em )
199199 bpParameters <- setBiocParallelParameters(reads , ncore , verbose , demultiplexed )
200200 xgb.set.config(nthread = 1 )
201201 # only when reads is not NULL, this proceed, otherwise, it will jump to quant step
@@ -221,7 +221,7 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
221221 genomeSequence = genome ,
222222 readClass.outputDir = rcOutDir , yieldSize = yieldSize ,
223223 bpParameters = bpParameters , stranded = stranded , verbose = verbose ,
224- isoreParameters = isoreParameters , trackReads = trackReads ,
224+ discoveryParameters = opt.discovery , trackReads = trackReads ,
225225 fusionMode = fusionMode ,
226226 processByChromosome = processByChromosome , processByBam = processByBam ,
227227 demultiplexed = demultiplexed ,
@@ -234,14 +234,14 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
234234 if (discovery ) {
235235 message(" --- Start extending annotations ---" )
236236 extendedAnnotations <- bambu.extendAnnotations(readClassList , annotations , NDR ,
237- isoreParameters , stranded , bpParameters , fusionMode , verbose )
237+ opt.discovery , stranded , bpParameters , fusionMode , verbose )
238238 metadata(extendedAnnotations )$ warnings = warnings
239239
240240 # ### cluster based transcript discovery
241241 if (! is.null(clusters )){
242242 annotations.clusters <- isore.extendAnnotations.clusters(readClassList ,
243- annotations , clusters , NDR ,
244- isoreParameters , stranded , bpParameters , fusionMode , verbose = FALSE )
243+ annotations , clusters , NDR ,
244+ opt.discovery , stranded , bpParameters , fusionMode , verbose = FALSE )
245245 metadata(extendedAnnotations )$ clusters <- annotations.clusters
246246 }
247247 annotations <- extendedAnnotations
@@ -254,7 +254,7 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
254254 assignReadClasstoTranscripts(
255255 readClassList = readClassList [[i ]],
256256 annotations = annotations ,
257- rcAssignmentParameters = rcAssignmentParameters ,
257+ rcAssignmentParameters = opt.rcAssignment ,
258258 verbose = verbose ,
259259 # for bulk data, there is one sampleData (keep sampleData[1]), for single-cell, there is one per sample
260260 sampleMetadata = if (length(sampleData ) == 1 ) sampleData [1 ] else sampleData [i ],
@@ -270,10 +270,10 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
270270 if (quant ) {
271271 message(" --- Start isoform EM quantification ---" )
272272 if (! is.null(NDR ) & ! discovery )# this step is used when reset NDR is needed
273- annotations <- setNDR(annotations , NDR ,
274- prefix = isoreParameters $ prefix ,
275- baselineFDR = isoreParameters [[" baselineFDR" ]],
276- defaultModels2 = isoreParameters [[" defaultModels" ]])
273+ annotations <- setNDR(annotations , NDR ,
274+ prefix = opt.discovery $ prefix ,
275+ baselineFDR = opt.discovery [[" baselineFDR" ]],
276+ defaultModels2 = opt.discovery [[" defaultModels" ]])
277277 if (length(annotations )== 0 ) stop(" No valid annotations, if running
278278 de novo please try less stringent parameters" )
279279 if (is.null(quantData )) stop(" quantData must be provided or assignDist = TRUE" )
@@ -318,8 +318,8 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
318318 }
319319 return (bambu.quantify(readClassDt = metadata(quantData_i )$ readClassDt , countMatrix = countMatrix ,
320320 incompatibleCountMatrix = data.table(GENEID.i = as.numeric(rownames(metadata(quantData_i )$ incompatibleCountMatrix )), counts = incompatibleCountMatrix ),
321- txid.index = mcols(annotations )$ txid , GENEIDs = GENEIDs.i , isoreParameters = isoreParameters ,
322- emParameters = emParameters , trackReads = trackReads ,
321+ txid.index = mcols(annotations )$ txid , GENEIDs = GENEIDs.i ,
322+ emParameters = opt.em , trackReads = trackReads ,
323323 verbose = verbose ))},
324324 BPPARAM = bpParameters )
325325 end.ptm <- proc.time()
0 commit comments