Giter VIP home page Giter VIP logo

kseqpp's Issues

ZLIB cannot be linked...

When compiling the code containing kseq++ it keeps complaining about the ZLIB:

undefined reference to `gzopen'
undefined reference to `gzread'

Although the ZLIB is being interfaced in the CMAKE configurations of kseq++, the following lines were necessary to be added to the project's CMakeLists.txt to force linking ZLIB:

find_package(ZLIB)
target_link_libraries(_target_ ZLIB::ZLIB)

No default constructor for defined classes

Hi, I want to make a map of {int -> SeqStreamOut}, for output reads to different files according to the int key. but the compiler says that "no matching constructor for initialization of SeqStreamOut", any could help me? Thank you

A problem with a newline when writing FASTQ

When writing a FASTQ file using this library, I find a newline is added into sequence line and quality line by default. My output result is like this:

@name
AGAAAGCTTCATGTTTCAATTGGCCAAAGAATAAGGTAGAGTACGGTAGAAAATAGAGTG
AGCGAACAAA
+
222222222222222222222222222222222222222222222222222222222222
2222222222

Is there any way to avoid the newline?

Unable to install the library using provided CMakeLists.txt

Library installation instructions would be greatly appreciated!

Upon trying to install the library using cmake... The following results:

-- The CXX compiler identification is GNU 8.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at CMakeLists.txt:17 (add_library):
  add_library INTERFACE library requires no source arguments.


CMake Error at CMakeLists.txt:19 (target_sources):
  Cannot specify sources for target "kseq++" which is not built by this
  project.


CMake Error at CMakeLists.txt:21 (target_include_directories):
  Cannot specify include directories for target "kseq++" which is not built
  by this project.


CMake Error at CMakeLists.txt:28 (target_link_libraries):
  Cannot specify link libraries for target "kseq++" which is not built by
  this project.


-- Configuring incomplete, errors occurred!

Add usage and installation guide

Suggested in #2, there should be a section in the README file explaining how to install the library and alternatively how to bundle it in the source tree without installation (i.e. as a git submodule).

feature request, make threads optional

this is a great minimal library, thanks!
it would be nice have std::thread as an ifdef option.
these are my changes, not tested yet.

line 29

#ifdef KSEQPP_THREADS
  #include <thread>
#endif

line 100

#ifdef KSEQPP_THREADS
        std::thread worker;                             /**< @brief worker thread */
#endif

line 430

          inline void
        worker_join( )
        {
#ifdef KSEQPP_THREADS
          this->async_write( true );
          if ( this->worker.joinable() ) this->worker.join();
#else
          this->async_write( false );
#endif
        }

          inline void
        worker_start( )
        {
#ifdef KSEQPP_THREADS
          this->worker = std::thread( &KStream::writer, this );
#else
          this->writer();
#endif
        }

Broken output if seq/qual is empty

After doing some adapter trimming on a read I wound up with an empty sequence (and corresponding empty qualities). When I write that out instead of four lines (two of them blank) I get only two lines (name line and one blank line). And the name line starts with a greater-than sign (>) instead of an at-sign (@). Setting the wraplen to larger values (I tried 1000 and 10000) had no effect.

Code sample follows:

// g++ -Wall -Wextra -O3 -std=c++14 -I /path/to/kseqpp/src emptySeq.cpp -o emptySeq -lz -pthread

#include <iostream>
#include <seqio.h>

int main()
{
    klibpp::SeqStreamOut out("/dev/stdout");

    klibpp::KSeq s;
    s.name = "should start with an at-sign";
    s.seq = "";
    s.qual = "";
    out << s;

    return 0;
}

I also tried opening /dev/tty, /dev/stderr and a file on disk. Same output.

If I set the seq/qual to even a single character it behaves fine.

Using g++ 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 on Ubuntu 16.04.6 LTS.

Maybe using libdeflate for decompression is faster?

When decompressing a file that has been compressed with gzip, kseqpp relies on zlib for decompression. However, there is a library called libdeflate which offers faster decompression speed compared to zlib. Perhaps using libdeflate could result in improved performance?

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.