Skip to content

Add option to specify index location for idxstats.#2093

Merged
jkbonfield merged 2 commits into
samtools:developfrom
whitwham:idxstats_index
Aug 15, 2024
Merged

Add option to specify index location for idxstats.#2093
jkbonfield merged 2 commits into
samtools:developfrom
whitwham:idxstats_index

Conversation

@whitwham

@whitwham whitwham commented Aug 6, 2024

Copy link
Copy Markdown
Member

Add the -X option (used in some other tools) to specify the index location. Not entirely necessary because there is another way to do it, but this is a more straight forward way.

Fixes #2071.

Comment thread doc/samtools-idxstats.1 Outdated
Comment on lines +67 to +69
This option will allow the user to specify a customised index file
location. Example usage: samtools idxstat [options] -X </data_folder/data.bam>
[/index_folder/index.bai]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be inclined to removed the <> and [] bits in this example for filename and index. See the EXAMPLES section of samtools-view.1 which has a -X option.

If not, then [...] is misleading as it implies it's optional, but when using -X it's mandatory.

Suggestion:

This option will allow the user to specify a customised index file
location.  E.g.

.B samtools idxstats [options] -X /data/in.bam /index/in.bai                                           

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the example in samtools-depth.1.

@jkbonfield jkbonfield Aug 15, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not using angle brackets though and it doesn't have the mandatory components in square brackets except where they're optional because the BAM filename was optional too). Ie it's essentially fn1 [fn2 ...] idx1 [idx2 ...].

Granted we're not great on consistency though.

@jkbonfield jkbonfield merged commit 8bec6d6 into samtools:develop Aug 15, 2024
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 this pull request may close these issues.

Allow users to specify index location for idxstats

2 participants