Question: deepTools computeMatrix need at least one array to concatenate error
gravatar for leeb4
4 months ago by
leeb40 wrote:

Hi all!

I used deepTools bamCoverage to generate bigWig files from two ATAC-seq BAM files using the arguments

-of bigwig --binSize 10 --normalizeUsing RPGC --effectiveGenomeSize 2827437033 --ignoreForNormalization chrX --skipNAs --extendReads 150 –centerReads

I then tried using computeMatrix (version 3.1.2) to calculate scores per genome regions. The inputs are the two bigWig files and a bed file that contains a “universe of peaks” generated using MACS2 callpeak followed by bedtools merge. Unfortunately, I keep getting ValueError: need at least one array to concatenate.

I tried troubleshooting a bit:

  1. The bed file is in the correct format (aligned to hg19, fields are chrom <tab> chromStart <tab> chromEnd).
  2. Uploaded bigwig files to UCSC genome browser using hg19 and the peaks look good.
  3. Looked at the bigwig files in the genomic regions listed in the bed file using UCSC genome browser, and there are indeed reads for both bigwig files.

Oddly enough, when I perform computeMatrix for each individual bigWig, I don’t get the error. However, when I try to include both bigwigs in the same matrix, I get the error every single time. Here are the arguments I used for computeMatrix:

reference-point -S ./bigwig/ ./bigwig/ -R all_peaks.bed -o comparison.mat.gz -a 3000 -b 3000 --smartLabels --skipZeros --verbose -p 16

Here is the error I get:

Traceback (most recent call last):
  File "/cm/shared/apps/python/2.7.12/bin/computeMatrix", line 14, in <module>
  File "/cm/shared/apps/python/2.7.12/lib/python2.7/site-packages/deeptools/", line 421, in main
    hm.computeMatrix(scores_file_list, args.regionsFileName, parameters, blackListFileName=args.blackListFileName, verbose=args.verbose, allArgs=args)
  File "/cm/shared/apps/python/2.7.12/lib/python2.7/site-packages/deeptools/", line 271, in computeMatrix
    matrix = np.concatenate([r[0] for r in res], axis=0)
ValueError: need at least one array to concatenate

Thanks in advance!

software error • 345 views
ADD COMMENTlink modified 5 weeks ago by jimmy09580737360 • written 4 months ago by leeb40

Unfortunately the only way for me to debug this is to have a copy of the files. If they're small enough please post them somewhere and send me a link ( and I can have a look.

ADD REPLYlink written 4 months ago by Devon Ryan97k

Devon - thanks so much. I'm sending the link for the bigWig and bed files to your email. Appreciate it!

ADD REPLYlink written 4 months ago by leeb40

I also meet that same problem. How can I fix this problem?? My bed file is from the UCSC genome browser. Then bigwig file I already check on the IGV browser(Hg 38) Can I know your method to adjust?

ADD REPLYlink written 6 weeks ago by jimmy09580737360

You have some sort of major name mismatch between the BED and bigWig files or there are simply no entries in the bigWig file within the regions specified by the BED file.

ADD REPLYlink written 6 weeks ago by Devon Ryan97k

Devon - thanks so much. But I try to put them (Bed file and Bigwig file) on the IGV browser. It seems like the BED region with bigwig files having some occupancy(tracks) on that. And also I check the index between the bed file and the bigwig file. Both of them indeed are the GRCh38 reference genome. Strangely I did mouse mm10 than before, but everything seems like OK. (Because I plot them to the heatmap figure). So I'm so confusing.

ADD REPLYlink written 5 weeks ago by jimmy09580737360
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1968 users visited in the last hour