Giter VIP home page Giter VIP logo

Comments (6)

lmdu avatar lmdu commented on June 14, 2024

Thank you for your posting. Pyfastx aims to enable random access to reads from FASTQ files which depends on an index file. If index file does not exists, pyfastx will build an index file when the FASTQ file is first opened. This step may consume much more time. When you open file again and read sequences, it will be very fast to iterate sequences and comparable to iteration without index. For gzipped file, in addition to positional index, it also will build seek point index for accelerating gzip seek operation.

from pyfastx.

afrubin avatar afrubin commented on June 14, 2024

Thanks for the quick reply.

When nothing is done with the reads except adding them to a list, pyfastx performs as expected. However, when the read attributes are accessed while processing the file (e.g. to filter based on quality) performance is very poor.

In my testing, the uncompressed file took 1m 5s wall time to build the index and process the full file, but the gzip-compressed version reliably failed to complete in less than an hour. This seemed to be the case whether or not a new index was built.

from pyfastx.

lmdu avatar lmdu commented on June 14, 2024

Thank you for reporting this hidden performance problem!
For iteration of reads from gzipped FASTQ file, each read was read by seeking to the start position and then read content using zran_read in zran.c. However, zran_read has a low performance for IO intensive operation which I didn't notice before. In later version, I will add a buffer reader to improve the performance. Thanks again!

from pyfastx.

afrubin avatar afrubin commented on June 14, 2024

No problem! Let me know when this is implemented and I'll happily update the examples in my package documentation.

from pyfastx.

lmdu avatar lmdu commented on June 14, 2024

We have improved the speed of reading sequence from gzipped FASTQ file in new version 0.6.10

from pyfastx.

afrubin avatar afrubin commented on June 14, 2024

@lmdu Just wanted to let you know that I've re-run the benchmarks for my package as part of a new release and pyfastx performance is greatly improved!

from pyfastx.

Related Issues (20)

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.