I tried running the dba.count function and got the following error message? The bam files seem to be fine.
> chip_seq=chip_seq(tamoxifen,summit=250)
Error: Error processing one or more read files. Check warnings().
In addition: There were 28 warnings (use warnings() to see them)
I'm not sure why the warning messages are blank. One thing to try is to run dba.count() in serial mode by setting bParallel=FALSE. This may make the specific warnings more explicit.
When we see this error, one of the following problems is usually the cause:
The files aren't really where you think they are. You can test this as follows:
> file_test("-f",myDBA$class[10,]) #should return all TRUE values if the filepaths are correct.
There are no matching .bai files for each .bam file. You can test this as follows:
> file_test("-f",gsub(".bam",".bam.bai",myDBA$class[10,])) #should return all TRUE values
There is something wrong with the format of the bam file, you can check consistency eg. with bamtools flagstat
I added bParallel=FALSE to the code and it seems to work. The bam files can now be loaded. I checked the bam files using samtools flagstat and your codes and the bam files seem to be fine.
However, I stumbled upon another problem when I started running dba.count. The process was killed (probably due to high memory usage). I tried setting $config$yieldSize=50000 and bUseSummarizeOverlaps=TRUE but it didn't seem to help.
ahh, i suspect this was the real problem all along. The memory issue isn't happening during the counting (so yieldSize/summarizeOverlaps won't help), but in the construction of the binding matrix.
How many peaks are there in the consensus set? Before you run dba.count(), if you print out the DBA object, it will tell you how many sites, I wonder if this is a very high number? The binding matrix will be that many rows x 28 columns, there needs to be enough memory for that.