deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
233 stars 70 forks source link

hicPCA ValueError #802

Open 14stutzmanav opened 2 years ago

14stutzmanav commented 2 years ago

Hi there,

I'm experiencing an issue with hicPCA, where it gives a ValueError. I'm using python version 3.7.12 and hicexplorer version 3.7.2. Here is the command I run:

hiceMat=${genotype}.h5
obsexp=hice-compartments/${genotype}-ObsExp.h5
pearson=hice-compartments/${genotype}-Pearson.h5
eigen1=hice-compartments/${genotype}-eigenvector1.bw
eigen2=hice-compartments/${genotype}-eigenvector2.bw
eigen3=hice-compartments/${genotype}-eigenvector3.bw
genes='dm6-genes.bed'

hicPCA --matrix $hiceMat \
        -o $eigen1 $eigen2 $eigen3 \
        -f "bigwig" \
        -pm $pearson \
        -oem $obsexp \
        -we 1 2 3 \
        --extraTrack $genes

and here is the output:

Traceback (most recent call last):
  File "/nas/longleaf/apps/hicexplorer/3.7.2/miniconda3/envs/hicexplorer/bin/hicPCA", line 7, in <module>
    main()
  File "/nas/longleaf/apps/hicexplorer/3.7.2/miniconda3/envs/hicexplorer/lib/python3.7/site-packages/hicexplorer/hicPCA.py", line 355, in main
    vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.extraTrack)
  File "/nas/longleaf/apps/hicexplorer/3.7.2/miniconda3/envs/hicexplorer/lib/python3.7/site-packages/hicexplorer/hicPCA.py", line 191, in correlateEigenvectorWithGeneTrack
    gene_occurrence_per_chr[chromosome])
  File "/nas/longleaf/apps/hicexplorer/3.7.2/miniconda3/envs/hicexplorer/lib/python3.7/site-packages/scipy/stats/stats.py", line 4013, in pearsonr
    raise ValueError('x and y must have the same length.')
ValueError: x and y must have the same length.

Any help you can provide would be greatly appreciated! Thanks a lot.

xscapintime commented 1 year ago

had this issue with gene track bed too. histone bw seems work without problems.