biocore-ntnu / epic

(DEPRECATED) epic: diffuse domain ChIP-Seq caller based on SICER
http://bioepic.readthedocs.io
MIT License
31 stars 6 forks source link

epic-merge throws an error of ValueError: Cannot convert NA to integer #79

Closed lucacozzuto closed 6 years ago

lucacozzuto commented 6 years ago

Dear developers, I tried to run epic-merge using two matrices and bed files generated by epic and I got the following error:

/users/bi/lcozzuto/.pyenv/versions/2.7.13/lib/python2.7/site-packages/numpy/lib/arraysetops.py:463: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  mask |= (ar1 == a)
Calling H3K27me3_EWS-FLI_matrix.txt.gz Enriched_H3K27me3_EWS-FLI_matrix.txt.gz in matrix file. (File: merge, Log level: INFO, Time: Tue, 26 Jun 2018 16:19:28 )
Calling H3K27me3_hMSC_matrix.txt.gz Enriched_H3K27me3_hMSC_matrix.txt.gz in matrix file. (File: merge, Log level: INFO, Time: Tue, 26 Jun 2018 16:19:56 )
Traceback (most recent call last):
  File "/users/bi/lcozzuto/.pyenv/versions/2.7.13/bin/epic-merge", line 91, in <module>
    merged_df = main(files, regions, keep_nonenriched, enriched_per_file, nb_cpus)
  File "/users/bi/lcozzuto/.pyenv/versions/2.7.13/lib/python2.7/site-packages/epic/merge/merge.py", line 20, in main
    bin_size = compute_bin_size(dfs)
  File "/users/bi/lcozzuto/.pyenv/versions/2.7.13/lib/python2.7/site-packages/epic/merge/merge_helpers.py", line 20, in compute_bin_size
    bins = df.head(100000).index.get_level_values("Bin").astype(int)
  File "/users/bi/lcozzuto/.pyenv/versions/2.7.13/lib/python2.7/site-packages/pandas/core/indexes/numeric.py", line 318, in astype
    raise ValueError('Cannot convert NA to integer')
ValueError: Cannot convert NA to integer

I'm using epic 0.2.9

Best, Luca

endrebak commented 6 years ago

You have some Bins which are NA. This is an error produced from the original epic. I cannot see when this should ever happen, so if you are able to provide more details I'd appreciate it.

endrebak commented 6 years ago

Thanks for reporting btw.

lucacozzuto commented 6 years ago

Hi, I was not able to replicate the problem so you can close it.

Thanks!

L