Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestReadPairs.test_select fails #161

Open
rekado opened this issue Jul 15, 2023 · 0 comments
Open

TestReadPairs.test_select fails #161

rekado opened this issue Jul 15, 2023 · 0 comments

Comments

@rekado
Copy link

rekado commented Jul 15, 2023

In the build for GNU Guix we see a test failure in test_select when building the latest commit 354401e with Python 3.10. We run pytest with -m not longrunning --ignore=fanc/test/test_matrix.py. Here's the relevant test output:

__________________________ TestReadPairs.test_select ___________________________

self = <test_pairs.TestReadPairs object at 0x7ffdc5ca89d0>

    def test_select(self):
>       pair = self.pairs[11]

fanc/test/test_pairs.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/gnu/store/frv39wj991w2m2x5ays29fhl4lzk9nqb-fanc-0-1.354401e/lib/python3.10/site-packages/fanc/pairs.py:1943: in __getitem__
    edge = self.get_edge(item)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fanc.pairs.ReadPairs object at 0x7ffdc5e88e50>, item = 11
row_conversion_args = (), row_conversion_kwargs = {}, l = 0, _ = (0, 0)
edge_table = /pairs/chrpair_0_0 (MaskedTable(0,), shuffle, blosc(1)) ''
  description := {
  "source": Int32Col(shape=(), dflt=0, p...ink": Index(6, medium, shuffle, zlib(1)).is_csi=False,
    "_mask_ix": Index(6, medium, shuffle, zlib(1)).is_csi=False}

    def get_edge(self, item, *row_conversion_args, **row_conversion_kwargs):
        """
        Get an edge by index.
    
        :param row_conversion_args: Arguments passed to :func:`RegionPairs._row_to_edge`
        :param row_conversion_kwargs: Keyword arguments passed to :func:`RegionPairs._row_to_edge`
        :return: :class:`~Edge`
        """
        if item < 0:
            item += len(self)
    
        l = 0
        for _, edge_table in self._iter_edge_tables():
            if l <= item < l + len(edge_table):
                res = edge_table[item - l]
                return self._row_to_edge(res, *row_conversion_args, **row_conversion_kwargs)
            l += len(edge_table)
>       raise IndexError("index out of range (%d)" % item)
E       IndexError: index out of range (11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant