DiffBind dba.count Error in if (sum(tokeep) < length(tokeep))
2
0
Entering edit mode
@8697b6e2
Last seen 3 months ago
Hong Kong

When I used dba.cout with DiffBind， the following error occurred.

Code should be placed in three backticks as shown below

library(DiffBind)
library(parallel)
dbObj <- dba(sampleSheet="SampleSheet.csv")
dbObj <- dba.count(dbObj, bUseSummarizeOverlaps=TRUE)


The following error occurred

Error in if (sum(tokeep) < length(tokeep)) { :
missing value where TRUE/FALSE needed


The bam files were obtained after bowtie2 alignment, and the bed files were obtained using AutoCirc. The last line of these bed files was not truancated.

Here are some related figures.

Here is the head of bed file

DiffBind dba.count • 434 views
0
Entering edit mode

Can anyone help?

1
Entering edit mode
jseg ▴ 10
@4cfcb545
Last seen 4 months ago
France

Hey,

Did you make the index of the BAM files?

If not, this can sometimes produce the error code you received.

0
Entering edit mode

I have indexed the bam files using samtools, however this error still occurred.

0
Entering edit mode
Rory Stark ★ 4.4k
@rory-stark-5741
Last seen 19 hours ago
CRUK, Cambridge, UK

Continuing from the duplicated question at BioStars (https://www.biostars.org/p/9505794/#9506872):

Is there a reason that the .bam files have "unmapped" in their filenames? If you are trying to count unmapped reads I would expect that to fail!

For me to see exactly what is happening I'd need access to some or all of your data, including

• the DBA object dbObj prior to the call to dba.count(), saved using dba.save()
• the four .bam and .bai files

If you can do that, email me a link where I can download it.

0
Entering edit mode
https://drive.google.com/drive/folders/1787thVatZpt_KFrfXY-aXV1m0FRm8Mhm?usp=sharing


I did try to count unmapped reads to examine the m6a status of circRNAs.

0
Entering edit mode

I'm copying this over now, but have a couple of questions:

1. Did you create a ScanBamParamobject, set isUnmappedQuery, and store it as dbObj$config$scanbamparam to tell summarizeOverlaps() to attend to unmapped reads? It would help to see more of the script you used prior to calling dba.count().
2. Could you try running this without using summits? Try dbObj <- dba.count(dbObj, summits=FALSE)