Skip to content

Commit

Permalink
Merge branch 'release-v0.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cartoonist committed Mar 4, 2020
2 parents 5e0bcd8 + 4e71d5e commit 8e25f6f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(kseq++ VERSION 0.2.0 LANGUAGES CXX)
project(kseq++ VERSION 0.2.1 LANGUAGES CXX)

# Finding dependencies.
find_package(ZLIB REQUIRED)
Expand Down
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,31 @@ There is no need to write `kend` to the stream if using `SeqStreamOut`.

---

### Formatting

The default behaviour is to write a record in FASTQ format if it has quality
information. Otherwise, i.e. when the quality string is empty, the record will
be written in FASTA format. So, the output might be a mixture of FASTQ and FASTA
records. However, the output format can be forced by using `format::fasta` and
`format::fastq` modifiers. For example:

```c++
out << format::fasta << fastq_record;
out << another_record; // all other calls after this will also be in FASTA format.
```

will write a FASTQ record in FASTA format. These modifiers affect all writes
after them until another modifier is used. The `format::mix` modifier reverts
the behaviour to default.

---
**NOTE**

Writing a FASTA record in FASTQ format throws an exception unless the record is
empty (a record with empty sequence and quality string).

---

Benchmark
---------
### Datasets
Expand All @@ -201,7 +226,7 @@ For this benchmark, I re-used sequence files from SeqKit benchmark:
- OS: Debian GNU/Linux 9.4 (stretch), Linux 4.9.91-1-amd64-smp
- Compiler: GCC 6.3.0, compiled with optimisation level 3 (`-O3`)

### Result
### Result (for kseq++ v0.1.4)

#### Reading all records

Expand Down
8 changes: 4 additions & 4 deletions include/kseq++/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#ifndef KSEQPP_CONFIG_HPP__
#define KSEQPP_CONFIG_HPP__

#cmakedefine PROJECT_VERSION "@PROJECT_VERSION@"
#cmakedefine PROJECT_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@"
#cmakedefine PROJECT_VERSION_MINOR "@PROJECT_VERSION_MINOR@"
#cmakedefine PROJECT_VERSION_PATCH "@PROJECT_VERSION_PATCH@"
#define KSEQPP_PROJECT_VERSION "@PROJECT_VERSION@"
#define KSEQPP_PROJECT_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@"
#define KSEQPP_PROJECT_VERSION_MINOR "@PROJECT_VERSION_MINOR@"
#define KSEQPP_PROJECT_VERSION_PATCH "@PROJECT_VERSION_PATCH@"

#endif /* --- #ifndef KSEQPP_CONFIG_HPP__ --- */

0 comments on commit 8e25f6f

Please sign in to comment.