asntech / intervene

Intervene: a tool for intersection and visualization of multiple genomic region and gene sets
http://intervene.rtfd.io/
Other
132 stars 28 forks source link

small but confused bug for reading error #29

Closed clouds-drift closed 3 years ago

clouds-drift commented 4 years ago

Hi, When the intervene read the peak file, it seems to report a error as below:

Performing a pairwise intersection analysis. Please wait...

Traceback (most recent call last):
  File "/export/data2/anaconda2/bin/intervene", line 606, in <module>
    main()
  File "/export/data2/anaconda2/bin/intervene", line 426, in main
    pairwise.pairwise_intersection(label_names, options)
  File "/export/data2/anaconda2/lib/python2.7/site-packages/intervene/modules/pairwise/pairwise.py", line 412, in pairwise_intersection
    matrix, bed_sizes = create_matrix(beds=options.input, bed_names=label_names, func=FUNC, verbose=False, sort_bed=options.sort, **kwoptions)
  File "/export/data2/anaconda2/lib/python2.7/site-packages/intervene/modules/pairwise/pairwise.py", line 74, in create_matrix
    matrix[bed_names[ia]][bed_names[ib]] = func(a, b, **kwoptions)
  File "/export/data2/anaconda2/lib/python2.7/site-packages/intervene/modules/pairwise/pairwise.py", line 32, in jaccard_of_a
    return a.jaccard(b,u=True, **kwoptions)['jaccard']
  File "/export/data2/anaconda2/lib/python2.7/site-packages/pybedtools/bedtool.py", line 405, in wrapped
    return does_not_return_bedtool(stream, **kwargs)
  File "/export/data2/anaconda2/lib/python2.7/site-packages/pybedtools/bedtool.py", line 63, in _jaccard_output_to_dict
    header, data = _s.splitlines()
ValueError: need more than 0 values to unpack

I found out that when the input peak file has a last line as blank one, it will report. If I remove the last blank line, it is fine.

asntech commented 4 years ago

Thanks for reporting this. It should be fixed in the next release.

asntech commented 3 years ago

Fixed with https://github.com/bioconda/bioconda-recipes/pull/24800