@@ -40,14 +40,14 @@ writeBambuOutput <- function(se, path, prefix = "", outputExtendedAnno = TRUE,
4040 feature = ' transcript' ,outdir , prefix )
4141 print(d )
4242 }
43+ seGene <- transcriptToGeneExpression(se )
44+ writeCountsOutput(seGene , varname = ' counts' , feature = ' gene' ,outdir , prefix )
4345 # write incompatible counts
4446 if (! is.null(metadata(se )$ incompatibleCounts )){
45- estimates = metadata(se )$ incompatibleCounts
47+ estimates <- metadata(se )$ incompatibleCounts [rownames( seGene ), , drop = FALSE ]
4648 estimatesfn <- paste(transcript_gtffn , " incompatibleCounts.mtx" , sep = " " )
4749 Matrix :: writeMM(estimates , estimatesfn )
4850 }
49- seGene <- transcriptToGeneExpression(se )
50- writeCountsOutput(seGene , varname = ' counts' , feature = ' gene' ,outdir , prefix )
5151 # utils::write.table(paste0(colnames(se), "-1"), file = paste0(outdir, "barcodes.tsv"), quote = FALSE, row.names = FALSE, col.names = FALSE)
5252 # R.utils::gzip(paste0(outdir, "barcodes.tsv"))
5353 txANDGenes <- data.table(as.data.frame(rowData(se ))[,c(" TXNAME" ," GENEID" )])
0 commit comments