Giter Site home page Giter Site logo

python-giggle's People

Contributors

brentp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-giggle's Issues

Query returns results outside query interval?

I am performing some queries on a index containing TAD intervals and I noticed sometimes the query returns 2 results where I only expect to see one (because I know all the intervals in the index are non overlapping). When checking the results, I noticed that sometimes they include a result that should not overlap with the query interval. For example:

result = index.query("chr5", 90466028, 90466028)

for hit in result[1]:
    print(hit)
print(result.n_hits(1))

returns:

chr5	179080000	179120000	AD, CO, HC, MSC, PA, RV
chr5	90760000	90800000	H1, MES, NPC
2

The first results definitely does not overlap with the single query position and the second result also doe snot seem to overlap. The same is true for the other file in the index:

result = index.query("chr5", 90466028, 90466028)

for hit in result[0]:
    print(hit)
print(result.n_hits(0))

returns:

chr5	179062994	179083794	13_Heterochrom/lo
1

I am not sure if this is a bug or the fault lies in my index and/or indexed data or that I am just completely misinterpreting the results?

offset_index_store: Could not truncate

When trying to create an index using one of the test files (python-giggle\lib\giggle\test\data\1k.sort.bed.gz) using the following code:

from giggle import Giggle 
index = Giggle.create("index", "1k.sort.bed.gz")

I get the following error:
python: offset_index_store: Could not truncate.: Invalid argument

It looks like the error is occurring from offset_index.c line 170:

if ( ret != 0 )
        err(1, "offset_index_store: Could not truncate.");

I have no clue as to why this is happening even with the test data (tried others as well). I am using python 3.6 but got the same error on python 2.7.

python3 issue during setup.py test

I used a fresh miniconda3 python 3.6 environment in which i tried to install python-giggle. I pip installed cython and numpy. However when I run setup.py test I get the error:

======================================================================
ERROR: <nose.suite.ContextSuite context=test_giggle>
test suite for <module 'test_giggle' from '/home/CODE1/320000451/Software/python-giggle/giggle/tests/test_giggle.py'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/CODE1/320000451/Software/python-giggle/.eggs/nose-1.3.7-py3.6.egg/nose/suite.py", line 210, in run
    self.setUp()
  File "/home/CODE1/320000451/Software/python-giggle/.eggs/nose-1.3.7-py3.6.egg/nose/suite.py", line 293, in setUp
    self.setupContext(ancestor)
  File "/home/CODE1/320000451/Software/python-giggle/.eggs/nose-1.3.7-py3.6.egg/nose/suite.py", line 316, in setupContext
    try_run(context, names)
  File "/home/CODE1/320000451/Software/python-giggle/.eggs/nose-1.3.7-py3.6.egg/nose/util.py", line 471, in try_run
    return func()
  File "/home/CODE1/320000451/Software/python-giggle/giggle/tests/test_giggle.py", line 18, in setup
    Giggle.create(INDEX, "lib/giggle/test/data/many/*.bed.gz")
  File "giggle/giggle.pyx", line 25, in giggle.giggle.Giggle.create
    def create(self, char *path, char *glob):
TypeError: expected bytes, str found

The issue is probably that "lib/giggle/test/data/many/*.bed.gz" is a unicode string and not a byte string in python3. Is the software only intended for use with python2 or will I be able to just use it with python3? setup.py install seems to be working fine and in my own code I could make sure to always explicitly convert to byte strings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.