Skip to content

Commit 3751b97

Browse files
committed
Merge branch 'rh/docs_columns_arg' into 'master'
added warning about positional arguments and --columns See merge request minknow/pod5-file-format!308
2 parents c68c43a + 8e4d0d9 commit 3751b97

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
- Transfers dataframes used in subsetting / filter use categorical fields to reduce memory consumption
1515
- Polars version increased to `~=0.19`
16+
- Documentation regarding positional arguments
1617
- Renamed deprecated `polars.groupby` to `polars.group_by`
1718

1819
### Fixed

docs/docs/tools.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ then ``pod5 filter`` might be a more appropriate tool as the only input is a lis
239239
$ pod5 subset example_1.pod5 --csv mapping.csv
240240
241241
# Subset input(s) using a dynamic mapping created at runtime
242-
$ pod5 subset example_1.pod5 --table table.txt --columns barcode
242+
$ pod5 subset example_1.pod5 --columns barcode --table table.txt
243243
244244
.. important::
245245

@@ -248,6 +248,18 @@ then ``pod5 filter`` might be a more appropriate tool as the only input is a lis
248248
will be raised unless the ``--duplicate-ok`` argument is set. If ``--duplicate-ok`` is
249249
set then both reads will be written to the output, although this is not recommended.
250250

251+
.. warning::
252+
253+
The ``--columns`` argument will greedily consume values and as such, care should be taken
254+
with the placement of any positional arguments. The following line will result in an error
255+
as the input pod5 file is consumed by ``--columns`` resulting in no input file being set.
256+
257+
.. code-block:: console
258+
259+
# Invalid placement of positional argument example.pod5
260+
$ pod5 subset --table table.txt --columns barcode example.pod5
261+
262+
251263
Creating a Subset Mapping
252264
------------------------------
253265

python/pod5/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,17 @@ then ``pod5 filter`` might be a more appropriate tool as the only input is a lis
340340
> will be raised unless the ``--duplicate-ok`` argument is set. If ``--duplicate-ok`` is
341341
> set then both reads will be written to the output, although this is not recommended.
342342
343+
#### Note on positional arguments
344+
345+
> The ``--columns`` argument will greedily consume values and as such, care should be taken
346+
> with the placement of any positional arguments. The following line will result in an error
347+
> as the input pod5 file is consumed by ``--columns`` resulting in no input file being set.
348+
349+
```bash
350+
# Invalid placement of positional argument example.pod5
351+
$ pod5 subset --table table.txt --columns barcode example.pod5
352+
```
353+
343354
#### Creating a Subset Mapping
344355
345356
##### Target Mapping (.csv)

0 commit comments

Comments
 (0)