This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DiffBind dba.normalize error using spikein reads

Hi everyone,

I'm bumping into some issues when running the spike-in normalization method on DiffBind. I am including the aligned spiked-in reads in the Spikein column of the data frame containing the sample sheet as shown in the screenshot below.

enter image description here

When running dba.normalize, I am setting spikein to TRUE so that background normalization is performed using the spike-in tracks.

AF_batch123_20M_subset_test <- dba(sampleSheet="sample_datasheet_batch123_diffbind_cluster_20M_spikein_subset_test.csv")
AF_batch123_20M_subset_test_reads <- dba.count(AF_batch123_20M_subset_test)
AF_batch123_20M_subset_test_reads <- dba.normalize(AF_batch123_20M_subset_test_reads, spikein=TRUE)

This is the error that I keep getting when running the dba.normalize part from the script:

Error: BiocParallel errors
  6 remote errors, element index: 1, 2, 3, 4, 5, 6
  0 unevaluated and other errors
  first remote error: failed to open BAM index at 'NA'

Is the error suggesting I am missing some index files associated to each spikein BAM file? If that is the case, which are these files and how could I generate them?

Many thanks in advance!

diffbind chip-seq

I met the same error...

Did you fix it? And could you please kindly let me know the solution?

1 answer

You can generate them with samtools index your_file.bam

These allow quick access to specific reads within a bam file based on where the reads aligned.

Files may also need to be sorted. Sorting and indexing can be done in one step by samtools sort --write-index -o sorted.bam input.bam.

Log in to answer this question.