GithubHelp home page GithubHelp logo

ylab-hi / pxblat Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 0.0 79.95 MB

PxBLAT: An Efficient and Ergonomic Python Binding Library for BLAT

Home Page: https://pxblat.readthedocs.io/en/latest/

License: Other

Makefile 0.17% C 82.24% Python 8.06% C++ 9.06% Dockerfile 0.05% Jupyter Notebook 0.43%
alignment blat python sequence-analysis cpp c pybind11 bioinformatics

pxblat's People

Contributors

allcontributors[bot] avatar cauliyang avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pxblat's Issues

[Bug]: QueryResult is not a Bio object

Contact Details

What happened?

Hi!

I am trying to access the results after client.query using the Bio module instead of parsing the results as a list. In the tutorial you say that "The query result is the same as QueryResult of Bio.", however I can't access the data that way:

ret1 = client.query("GAAGAAGCTGGGATTGGAATGCAGGTCTCTTGCGGGATGTGGTGTGGGAGGAGAATGCACAAATGGACAGAGTGGGGGTTGGGGGCTGGGAAAGAGCTAAGGACCAGGGCAGGAGGGGATTCAAGAGACTGAGTAGGGCAGCTAGCTAGTTCCTGGGAGCTCTTCCCTTGTCATCTCATCAGTTTGGACTCCTCGAACAATTC")

# Command
ret1
# Result
[QueryResult(id='/tmp/tmpdd6dm058', 4 hits)]

# Command
type(ret1)
# Result
list

# Command
type(ret1[0])
# Result
Bio.SearchIO._model.query.QueryResul

# Command
qresults = SearchIO.parse(ret1[0], 'blast-xml') #I tried different formats
qresults
# Result
<generator object parse at 0x2b500bf297a0>

# Command
type(qresults)
# Result
generator

# Command
next(qresults)
# Result
TypeError: expected str, bytes or os.PathLike object, not QueryResult

# Command
qresults[0]
# Result
TypeError: 'generator' object is not subscriptable

# Command
for item in qresults:
    print(item)
# Result
TypeError: expected str, bytes or os.PathLike object, not QueryResult

# Command
for item in qresults:
    type(item)
# Result
TypeError: expected str, bytes or os.PathLike object, not QueryResult

I don't know if I'm doing something wrong, but I tried everything I knew.

Thank you very much! This program is very useful!!!

Best,
Ander

Version

v0.3.4

What platform are you working on?

Linux

Relevant log output

No response

Code of Conduct

Add contributor

Contact Details

No response

What happened?

A bug happened!

Version

vall

What platform are you working on?

Linux

Relevant log output

s

Code of Conduct

  • I agree to follow this project's Code of Conduct

Roadmap

๐Ÿ“† To-do

  • parser gfclient result
  • parse gfserver query result
  • benchmarking multi connection and original version
  • test result with original version
  • fix build.py to build ssl, hts, maybe libuv when install with pip
  • add tool to conda channel
  • add tool to pip
  • change abort to throw exceptions
  • implement twobit2fa
  • implement psl2sam
  • implement WebUI

๐Ÿ“– Enhance Documentation

  • Add comparable command line of BLAT

Add more tools as binding for current ucsc command line tools

[Bug]: Installation error on macos arm(M1/M2)

What happened?

$ python -c "import pxblat"                                                                                             16:32:11
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/ylk4626/miniforge3/envs/test_pxblat/lib/python3.10/site-packages/pxblat/__init__.py", line 1, in <module>
    from .extc import ClientOption
  File "/Users/ylk4626/miniforge3/envs/test_pxblat/lib/python3.10/site-packages/pxblat/extc/__init__.py", line 1, in <module>
    from .._extc.cppbinding import *  # type: ignore
ImportError: dlopen(/Users/ylk4626/miniforge3/envs/test_pxblat/lib/python3.10/site-packages/pxblat/_extc.cpython-310-darwin.so, 0
x0002): symbol not found in flat namespace '_BIO_ctrl'

Version

v1.1.1

What platform are you working on?

Mac Arm

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Client Limits: Too many open files

Description

The number of clients for a server is limited to around 250 so far. Otherwise, these will be an issue:

Too many open files 
blat server may be down

note: Command Line version of BLAT does not have this issue.

INFO

  • ulimit -n to control the number of open files
  • it will limit the number of opening files in one python sessions.

Add Docs

Plan

  • add a tutorial to walkthrough all features the lib provides
  • provide docs for APIs (Server, Client , and free functions)

Do not export `UsageStats`

UsageStats is used to summarize the status of the Server, for example, how many files are queried to the server? what is the 2-bit file?

However, the status may be not usable when we conduct some analysis.
In other words, the user may not use the status.
Hence, I do not export to the parameter for Server.
User will not pass theUsageStats to open Server

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.