Error while running bambu on multiple samples · Issue #513 · GoekeLab/bambu · GitHub
Skip to content

Error while running bambu on multiple samples #513

Open

Description

@Motoufiq

Hi,

I am running bambu on multiple samples, however, I come across an error. Could you please help me how to resolve this issue?

Since I am running bambu with multiple times, I tried processing annotation file first with annotations = prepareAnnotations(gtf.file) as well. I get same error.

Code:

library(bambu)

fa.file <- "/projects/hg38.fa"
gtf.file <- "/projects/gencode.v48.annotation.gtf"

DD1.bam.file <- "/projects/1_IsoSeqX_bc05_5p--IsoSeqX_3p.flnc.mapped.bam"
DD2.bam.file <- "/projects/2_IsoSeqX_bc01_5p--IsoSeqX_3p.flnc.mapped.bam"
DD3.bam.file <- "/projects/3_IsoSeqX_bc03_5p--IsoSeqX_3p.flnc.mapped.bam"
DD4.bam.file <- "/projects/4_IsoSeqX_bc04_5p--IsoSeqX_3p.flnc.mapped.bam"
DD5.bam.file <- "/projects/5_IsoSeqX_bc02_5p--IsoSeqX_3p.flnc.mapped.bam"
DD6.bam.file <- "/projects/6_IsoSeqX_bc08_5p--IsoSeqX_3p.flnc.mapped.bam"
DD7.bam.file <- "/projects/7_IsoSeqX_bc06_5p--IsoSeqX_3p.flnc.mapped.bam"
DD8.bam.file <- "/projects/8_IsoSeqX_bc07_5p--IsoSeqX_3p.flnc.mapped.bam"
DD9.bam.file <- "/projects/9_IsoSeqX_bc09_5p--IsoSeqX_3p.flnc.mapped.bam"
DD10.bam.file <- "/projects/10_IsoSeqX_bc10_5p--IsoSeqX_3p.flnc.mapped.bam"


se.multiSample <- bambu(reads = c(DD1.bam.file, DD2.bam.file, DD3.bam.file, DD4.bam.file, DD5.bam.file,
                                  DD6.bam.file, DD7.bam.file, DD8.bam.file, DD9.bam.file, DD10.bam.file), 
				annotations = gtf.file, genome = fa.file)

Error:

Running Bambu-v3.9.0
If you are running bambu multiple times we recommend processing your annotation file first with annotations = prepareAnnotations(gtf.file)
--- Start generating read class files ---
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://p3m.dev/cran/__linux__/jammy/2024-10-30
  |                                                                                                                          |   0%Number of Read Classes - 686149
  |============                                                                                                              |  10%Number of Read Classes - 764318
  |========================                                                                                                  |  20%Number of Read Classes - 650238
  |=====================================                                                                                     |  30%Number of Read Classes - 771976
  |=============================================================                                                             |  50%
Error: BiocParallel errors
  1 remote errors, element index: 5
  5 unevaluated and other errors
  first remote error:
Error in tibble(chr = as.factor(getChrFromGrList(readGrgList)), intronStarts = unname(unstrsplit(splitAsList(as.character(unlisted_junctions_start), : Tibble columns must have compatible sizes.
In addition: There were 26 warnings (use warnings() to see them)

Best Regards,
Toufiq

Activity

  1. SuiYue-2308 commented on Dec 8, 2025

    @SuiYue-2308
    Collaborator

    Hi @Motoufiq

    Could you let me know which branch you’re using? Also, are your data from single-cell experiments? This might be related to differences in BAM file formats.

    Thanks!

  2. Motoufiq commented on Dec 8, 2025

    @Motoufiq
    Author

    @SuiYue-2308

    Thank you for the response.

    I installed in my R several months ago, and I don't exactly remember which branch I am using? I do see from my R, I am using bambu v3.11.1 Is there a way to accurately know which branch I am using now?

    It is not from single-cell experiments. They are from PacBio data, and the samples are the bam files (Isoseq refine > mapped against hg38 reference using pbmm2 align, and sorted). I have 10 bam files in total and I am trying to run as multiple samples.

    Earlier, I tried importing all 10 bam files individually as well, out of 10, only one bam file, the 5th sample (i.e., DD5.bam.file) fails to import. Note this sample has twice the number of reads (~20M reads) compared to all other sample (bam) files. I could run other transcript collapsing tools such as FLAIR, stringtie2 etc., using this sample without any issues.

  3. Motoufiq commented on Dec 11, 2025

    @Motoufiq
    Author

    @SuiYue-2308

    I downloaded bambu from Bioconductor, and the bam file issue was resolved. However, I see my R shows bambu version 3.8.3 instead of version 3.12.0 (as shown in the Bioconductor)

    if (!require("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    
    BiocManager::install("bambu")
    

    The output of bambu also differs between the version.

    version 3.11.1

    [toufim@sumner-cba004 PacBio_Re_analyze]$ ll bambu_collapse
    -rw-rw-rw- 1 toufim jaxuser 2233539192 Nov 28 22:05 allTranscriptModels.gtf
    -rw-rw-rw- 1 toufim jaxuser     352502 Nov 28 22:06 counts_gene.mtx
    -rw-rw-rw- 1 toufim jaxuser    1206781 Nov 28 22:05 counts_transcript.mtx
    -rw-rw-rw- 1 toufim jaxuser    1279871 Nov 28 22:05 CPM_transcript.mtx
    -rw-rw-rw- 1 toufim jaxuser  635426067 Nov 28 21:46 extendedAnnotations.gtf
    -rw-rw-rw- 1 toufim jaxuser     600163 Nov 28 22:05 fullLengthCounts_transcript.mtx
    -rw-rw-rw- 1 toufim jaxuser    1437096 Nov 28 22:06 genes.tsv
    -rw-rw-rw- 1 toufim jaxuser     262669 Nov 28 22:05 incompatibleCounts.mtx
    -rw-rw-rw- 1 toufim jaxuser    1337740 Nov 28 22:05 novelTranscripts.gtf
    -rw-rw-rw- 1 toufim jaxuser         22 Nov 28 22:05 sampleData.tsv
    -rw-rw-rw- 1 toufim jaxuser  128738612 Nov 28 22:05 supportedTranscriptModels.gtf
    -rw-rw-rw- 1 toufim jaxuser   14172240 Nov 28 22:06 txANDgenes.tsv
    -rw-rw-rw- 1 toufim jaxuser     692536 Nov 28 22:05 uniqueCounts_transcript.mtx
    

    version 3.8.3

    [toufim@sumner-cba004 PacBio_Re_analyze]$ ll bambu_collapse_modified
    -rw-rw-rw- 1 toufim jaxuser   3479506 Dec 10 16:22 counts_gene.txt
    -rw-rw-rw- 1 toufim jaxuser  25134169 Dec 10 16:21 counts_transcript.txt
    -rw-rw-rw- 1 toufim jaxuser  25935593 Dec 10 16:21 CPM_transcript.txt
    -rw-rw-rw- 1 toufim jaxuser 309975874 Dec 10 16:21 extended_annotations.gtf
    -rw-rw-rw- 1 toufim jaxuser  22484163 Dec 10 16:21 fullLengthCounts_transcript.txt
    -rw-rw-rw- 1 toufim jaxuser  22271126 Dec 10 16:21 uniqueCounts_transcript.txt
    
  4. SuiYue-2308 commented on Dec 12, 2025

    @SuiYue-2308
    Collaborator

    Hi,

    Good to hear your issue has been resolved! We’ve updated bambu’s output format to better support single-cell data, where mtx files are more efficient. This change is only in the output format—the underlying readCount values should remain consistent with the previous format.

    Thanks!

  5. Motoufiq commented on Dec 12, 2025

    @Motoufiq
    Author

    @SuiYue-2308 Noted, I believe the extended_annotations.gtf content should also remain the same?

  6. SuiYue-2308 commented on Jan 7, 2026

    @SuiYue-2308
    Collaborator

    Hi,

    There will be some small changes, but most transcripts in extended_annotations.gtf will remain the same. We’re just aiming to identify additional novel isoforms that we couldn’t detect before.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions