Skip to content

Commit

Permalink
add slow5_set_skip_rid to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hasindu2008 committed Sep 26, 2024
1 parent 8a46ed4 commit 888d51f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
46 changes: 46 additions & 0 deletions docs/slow5_api/low_level_api/slow5_set_skip_rid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# slow5_set_skip_rid

## NAME

slow5_set_skip_rid - sets that a requested read missing is not to be treated as an error

## SYNOPSYS

`void slow5_set_skip_rid()`

## DESCRIPTION

`slow5_set_skip_rid()` sets that a requested read missing is not to be treated as an error. The default of behaviour of functions such as `slow5_get` that loads a requested read from a SLOW5 file is to print an error message and exit the programme if that read isn't found. This function can be used to disable this in legitimate cases where we expect some reads would be missing. Note that the `slow5_get` will still return a value indicating the error which can be used by the programmer to handle the case as they wish.

## RETURN VALUE

None.

## ERRORS

None.


## NOTES

Internally sets global variable. Intended to be set as the beginning of the programme.

## EXAMPLES

```
#include <stdio.h>
#include <stdlib.h>
#include <slow5/slow5.h>
int main(){
slow5_set_skip_rid(SLOW5_LOG_DBUG);
//... do the rest
}
```

## SEE ALSO
[slow5_set_log_level()](slow5_set_log_level.md)
[slow5_set_exit_condition()](slow5_set_exit_condition.md).
2 changes: 2 additions & 0 deletions docs/slow5_api/slow5_low_level_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Low-level API allows much more efficient access to BLOW5 files compared to the h
&nbsp;&nbsp;&nbsp;&nbsp;sets the level log message verbosity
* [slow5_set_exit_condition](low_level_api/slow5_set_exit_condition.md)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;sets if slow5lib should exit the programme on error
* [slow5_set_skip_rid](low_level_api/slow5_set_skip_rid.md)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;sets that a requested read missing is not to be treated as an error
* [slow5_idx_load_with](low_level_api/slow5_idx_load_with.md)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;loads the index file for a SLOW5 file given a file path for the index

Expand Down
2 changes: 1 addition & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ adv/sequential_read_openmp
adv/get_all_read_ids
mt/mt
mt/lazymt

example_write_ex-zd.blow5
Binary file removed examples/example_write_ex-zd.blow5
Binary file not shown.
4 changes: 1 addition & 3 deletions include/slow5/slow5.h
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,7 @@ void slow5_set_log_level(enum slow5_log_level_opt log_level);
//sets a global variable, so not thread safe
void slow5_set_exit_condition(enum slow5_exit_condition_opt exit_condition);

//experimental
/* no error messages printed and not exit when a requested read ID is not found in index*/
// being tested, do not use until added to documentation
// no error messages printed and not exit when a requested read ID is not found in index//
void slow5_set_skip_rid();

//get the list of hdr data keys in sorted order (only the returned pointer must be freed, not the ones inside - subjet to change)
Expand Down

0 comments on commit 888d51f

Please sign in to comment.