diff --git a/CMakeLists.txt b/CMakeLists.txt index 31f3273..ac7813c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(kseq++ VERSION 1.1.1 LANGUAGES CXX) +project(kseq++ VERSION 1.1.2 LANGUAGES CXX) #options option(BUILD_TESTING "Build test programs" OFF) # ignored by default diff --git a/README.md b/README.md index b8c0d7d..d2fa4aa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ kseq++ ====== -kseq++ is a C++11 re-implementation of [kseq](https://github.com/attractivechaos/klib/blob/master/kseq.h) +kseq++ is a C++11 re-implementation of [kseq](https://github.com/lh3/seqtk/blob/master/kseq.h)[.h](https://github.com/attractivechaos/klib/blob/master/kseq.h) by [Heng Li](https://github.com/lh3). The goal for re-implementation of `kseq` is providing better API and resource management while preserving its flexibility and performance. Like original kseq, this parser is based on generic stream @@ -373,7 +373,7 @@ For this benchmark, I re-used sequence files from SeqKit benchmark: \* storing all records in `std::vector`. -\*\* storing all records in `seqan::StringSet< seqan::CharString >`. +\*\* storing all records in `seqan2::StringSet< seqan2::CharString >`. #### Writing all records diff --git a/benchmark/kseq++_bench.cpp b/benchmark/kseq++_bench.cpp index bfe0f7f..507f5d0 100644 --- a/benchmark/kseq++_bench.cpp +++ b/benchmark/kseq++_bench.cpp @@ -121,10 +121,10 @@ main( int argc, char* argv[] ) close( fd ); } { - seqan::SeqFileIn f; - seqan::CharString name; - seqan::CharString str; - seqan::CharString qual; + seqan2::SeqFileIn f; + seqan2::CharString name; + seqan2::CharString str; + seqan2::CharString qual; open( f, argv[1] ); t = clock(); while ( !atEnd( f ) ) readRecord( name, str, qual, f ); @@ -201,11 +201,11 @@ main( int argc, char* argv[] ) std::cerr << "[kseq++/read_all] " << std::setprecision(3) << d << " sec" << std::endl; gzclose( fp ); } - seqan::StringSet< seqan::CharString > names; - seqan::StringSet< seqan::CharString > seqs; - seqan::StringSet< seqan::CharString > quals; + seqan2::StringSet< seqan2::CharString > names; + seqan2::StringSet< seqan2::CharString > seqs; + seqan2::StringSet< seqan2::CharString > quals; { - seqan::SeqFileIn i_file; + seqan2::SeqFileIn i_file; open( i_file, argv[1] ); t = clock(); readRecords( names, seqs, quals, i_file ); @@ -215,8 +215,8 @@ main( int argc, char* argv[] ) } std::cerr << "=== WRITE TESTS ===" << std::endl; { - seqan::SeqFileOut o_file; - open( o_file, argv[2], seqan::FileOpenMode::OPEN_WRONLY ); + seqan2::SeqFileOut o_file; + open( o_file, argv[2], seqan2::FileOpenMode::OPEN_WRONLY ); t = clock(); writeRecords( o_file, names, seqs, quals ); close( o_file ); diff --git a/include/kseq++/kseq++.hpp b/include/kseq++/kseq++.hpp index d85b14f..776bbbd 100644 --- a/include/kseq++/kseq++.hpp +++ b/include/kseq++/kseq++.hpp @@ -428,7 +428,7 @@ namespace klibpp { inline void worker_start( ) { - this->worker = std::thread( &KStream::writer, this ); + this->worker = std::thread( [this](){ this->writer(); } ); } };