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

Please add CLI option to specify location of BAM index #8

Closed
bkmartinjr opened this issue Dec 21, 2021 · 3 comments
Closed

Please add CLI option to specify location of BAM index #8

bkmartinjr opened this issue Dec 21, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@bkmartinjr
Copy link

Could you add an additional command line parameter, allowing the specification of the BAM index location? Eg,

hapdup --bam /some/where/abam.bam --bam-index /other/location/a_bam_index.bam.csi

And then pass that optional value to pysam.AlignmentFile() argument filepath_index?

Motivation: I'm wrapping hapdup and some other steps in a WDL script, and need to pass each file separately (ie, they are localized as individual files, and there is no guarantee they end up in the same directory when hapdup is invoked). The current hapdup assumes the index and bam are in the same directory, and fails.

Thanks!

CC: @0seastar0

@fenderglass fenderglass added the enhancement New feature or request label Dec 23, 2021
@fenderglass
Copy link
Collaborator

Hi! I was struggling with WDL recently as well, my "solution" was to reindex inside the WDL task :)

I've added the --bam-index option as requested, and created an updated docker image: mkolmogo/hapdup:0.4-bamindex. Let me know if it works for you - I will include it in the next release.

Mikhail

@bkmartinjr
Copy link
Author

Your work-around was cleverer than mine!

I have confirmed that the new option works as expected. Many thanks for the quick fix!

@fenderglass
Copy link
Collaborator

Now incorporated into 0.5 release.

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

No branches or pull requests

2 participants