Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

biom head -n 0 and -m 0 not supported #899

Closed
peterjc opened this issue Mar 9, 2023 · 1 comment · Fixed by #919
Closed

biom head -n 0 and -m 0 not supported #899

peterjc opened this issue Mar 9, 2023 · 1 comment · Fixed by #919

Comments

@peterjc
Copy link
Contributor

peterjc commented Mar 9, 2023

I consider this low priority, but probably an easy fix.

Observed behaviour

Attempting to use biom head -n 0 ... and/or -m 0 both fail with an ugly traceback ending IndexError: n cannot be <= 0. or IndexError: m cannot be <= 0.

Tested using macOS, biom-format installed via conda:

$ biom --version
biom, version 2.1.14

Expected behaviour:

Using -m 0 would show just the first column of identifiers (and no columns of samples). Work around:

$ biom head -m 1 example.biom | cut -f 1

Using -n 0 would show just the headers (including sample names unless -m 0), but none of the observations. Workaround:

$ biom head -n 1 example.biom | grep "^#"

@wasade
Copy link
Member

wasade commented Mar 9, 2023

Hah! Ya, good find :) Thank you by the way for taking such a deep dive with biom, it's extremely helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants