deepTools computeMatrix need at least one array to concatenate error
1
0
Entering edit mode
4.4 years ago
leeb4 • 0

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/bigwig1.bw ./bigwig/bigwig2.bw -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>
    main(args)
  File "/cm/shared/apps/python/2.7.12/lib/python2.7/site-packages/deeptools/computeMatrix.py", 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/heatmapper.py", 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 • 4.9k views
ADD COMMENT
0
Entering edit mode

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 (dpryan@dpryan.com) and I can have a look.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
23 months ago
1016397164 • 0

Perhaps the chromosome name of your bed is not the same as that in your bw file. Please check it. I find that problem in my reference bed, so I delete the 'Chr' in the first column using 'sed 's/Chr//g' rice.bed > rmchrrice.bed'. You can have a try.

ADD COMMENT

Login before adding your answer.

Traffic: 1992 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6