Skip to content

Commit

Permalink
update readme and add unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
hasindu2008 committed Feb 5, 2023
1 parent 2f95eb5 commit 372bfea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# slow5lib

*slow5lib* is a software library for reading & writing SLOW5 files. *slow5lib* is designed to facilitate use of data in SLOW5 format by third-party software packages. Existing packages that read/write data in FAST5 format can be easily modified to support SLOW5.
*slow5lib* is a software library for reading & writing SLOW5 files. *slow5lib* is designed to facilitate use of data in SLOW5 format by third-party software packages. Existing packages that read/write data in FAST5 or POD5 format can be easily modified to support SLOW5.

**About SLOW5 format:**<br/>
SLOW5 is a new file format for storing signal data from Oxford Nanopore Technologies (ONT) devices. SLOW5 was developed to overcome inherent limitations in the standard FAST5 signal data format that prevent efficient, scalable analysis and cause many headaches for developers. SLOW5 can be encoded in human-readable ASCII format, or a more compact and efficient binary format (BLOW5) - this is analogous to the seminal SAM/BAM format for storing DNA sequence alignments. The BLOW5 binary format supports *zlib* (DEFLATE) compression, or other compression methods (see [notes](https://github.com/hasindu2008/slow5lib#notes)), thereby minimising the data storage footprint while still permitting efficient parallel access. Detailed benchmarking experiments have shown that SLOW5 format is an order of magnitude faster and significantly smaller than FAST5.
SLOW5 is a new file format for storing signal data from Oxford Nanopore Technologies (ONT) devices. SLOW5 was developed to overcome inherent limitations in the standard FAST5 signal data format that prevent efficient, scalable analysis and cause many headaches for developers (and upcoming headaches with ONT's latest POD5 format). SLOW5 can be encoded in human-readable ASCII format, or a more compact and efficient binary format (BLOW5) - this is analogous to the seminal SAM/BAM format for storing DNA sequence alignments. The BLOW5 binary format supports *zlib* (DEFLATE) compression, or other compression methods (see [notes](https://github.com/hasindu2008/slow5lib#notes)), thereby minimising the data storage footprint while still permitting efficient parallel access. Detailed benchmarking experiments have shown that SLOW5 format is an order of magnitude faster and significantly smaller than FAST5.

Full documentation: https://hasindu2008.github.io/slow5lib<br/>
Pre-print: https://www.biorxiv.org/content/10.1101/2021.06.29.450255v1<br/>
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# slow5lib

*slow5lib* is a software library for reading & writing SLOW5 files. *slow5lib* is designed to facilitate use of data in SLOW5 format by third-party software packages. Existing packages that read/write data in FAST5 format can be easily modified to support SLOW5.
*slow5lib* is a software library for reading & writing SLOW5 files. *slow5lib* is designed to facilitate use of data in SLOW5 format by third-party software packages. Existing packages that read/write data in FAST5 or POD5 format can be easily modified to support SLOW5.

**About SLOW5 format:**
SLOW5 is a new file format for storing signal data from Oxford Nanopore Technologies (ONT) devices. SLOW5 was developed to overcome inherent limitations in the standard FAST5 signal data format that prevent efficient, scalable analysis and cause many headaches for developers. SLOW5 can be encoded in human-readable ASCII format, or a more compact and efficient binary format (BLOW5) - this is analogous to the seminal SAM/BAM format for storing DNA sequence alignments. The BLOW5 binary format supports *zlib* (DEFLATE) compression, or other compression methods, thereby minimising the data storage footprint while still permitting efficient parallel access. Detailed benchmarking experiments have shown that SLOW5 format is an order of magnitude faster and significantly smaller than FAST5.
SLOW5 is a new file format for storing signal data from Oxford Nanopore Technologies (ONT) devices. SLOW5 was developed to overcome inherent limitations in the standard FAST5 signal data format that prevent efficient, scalable analysis and cause many headaches for developers (and upcoming headaches with ONT's latest POD5 format). SLOW5 can be encoded in human-readable ASCII format, or a more compact and efficient binary format (BLOW5) - this is analogous to the seminal SAM/BAM format for storing DNA sequence alignments. The BLOW5 binary format supports *zlib* (DEFLATE) compression, or other compression methods, thereby minimising the data storage footprint while still permitting efficient parallel access. Detailed benchmarking experiments have shown that SLOW5 format is an order of magnitude faster and significantly smaller than FAST5.

Pre-print: https://www.biorxiv.org/content/10.1101/2021.06.29.450255v1<br/>
Publication: https://www.nature.com/articles/s41587-021-01147-4<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/slow5_extra.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int slow5_version_cmp(struct slow5_version x, struct slow5_version y);
// file_version: what is currently in the file
// max_supported: maximum slow5 version supported by this library
static inline int slow5_is_version_compatible(struct slow5_version file_version, struct slow5_version max_supported) {
if(max_supported.major == 0 && max_supported.minor == 2 && max_supported.patch == 0) { //forward compatibility (0.2.0 is same as 1.0.0)
if(max_supported.major == 0 && max_supported.minor == 2 && max_supported.patch == 0) { //forward compatibility (file version 0.2.0 is same as 1.0.0)
max_supported.major=1; max_supported.minor=0; max_supported.patch=0;
}
if (slow5_version_cmp(file_version, max_supported) > 0) {
Expand Down
6 changes: 6 additions & 0 deletions test/unit_test_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,13 @@ int version_compatible(void) {
file_version.major=1 ; file_version.minor=11 ; file_version.patch=1 ;
ASSERT(slow5_is_version_compatible(file_version, max_supported)==0); //file 1.11.1 max_supported 1.10.3

max_supported.major=0 ; max_supported.minor=1 ; max_supported.patch=0 ;
file_version.major=1 ; file_version.minor=0 ; file_version.patch=0 ;
ASSERT(slow5_is_version_compatible(file_version, max_supported)==0); //file 1.0.0 max_supported 0.1.0

max_supported.major=0 ; max_supported.minor=2 ; max_supported.patch=0 ;
file_version.major=1 ; file_version.minor=0 ; file_version.patch=0 ;
ASSERT(slow5_is_version_compatible(file_version, max_supported)==1); //file 1.0.0 max_supported 0.2.0 (sepcial case, 1.0.0=0.2.0)

return EXIT_SUCCESS;

Expand Down

0 comments on commit 372bfea

Please sign in to comment.