aquaskyline / Clairvoyante

Clairvoyante: a multi-task convolutional deep neural network for variant calling in Single Molecule Sequencing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'IntervalTree' object has no attribute 'search'

BryanHepworth opened this issue · comments

Hi
I tried installing Clairvoyante and running through the tests, unfortunately try as I might I can't get the test instances to run.

the testingData.tar suggestion downloads and extracts but then fails with AttributeError: 'IntervalTree' object has no attribute 'search'

I've done the install top to bottom as suggested - this is in a Centos 7 Software Collections python27 environment.

Any suggestions much appreciated,

Bryan

Please try reinstall the latest version of intervaltree for both python and pypy. As an alternative, you can also try installing the conda version.

Hi aquaskyline

I looked at the version numbers when I uninstalled and reinstalled the IntervalTree package - it was 3.0.2

A quick look shows that this version has a change to search -

https://pypi.org/project/intervaltree/

A mutable, self-balancing interval tree for Python 2 and 3. Queries may be by point, by range overlap, or by range envelopment.

This library was designed to allow tagging text and time intervals, where the intervals include the lower bound but not the upper bound.

Version 3 changes!

The search(begin, end, strict) method no longer exists. Instead, use one of these:
at(point)
overlap(begin, end)
envelop(begin, end)
The extend(items) method no longer exists. Instead, use update(items).
Methods like merge_overlaps() which took a strict argument consistently default to strict=True. Before, some methods defaulted to True and others to False.

Hi aquaskyline

I was just going back over the install notes and noticed the conda line was pointing to IntervalTree==2.1.0

I've just gone through and removed the later 3 version and am running through it again...

Hopefully you'll not hear back from me and it'll just work this time.
(just to add, that all ran through to completion using IntervalTree 2.1.0 - that's me a happy boy!)

Bryan

@BryanHepworth Thank you, Bryan, for your information. The new version is also new to me. Anyway, I've updated the README with the version number 2.1.0 spelled out. Good luck and let me know if you run into any problems.

I was able to fix this by replacing IntervalTree.search(pos) with IntervalTree[pos].