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

mergeSTR: support space-separated file list (which in turn allows for globs etc)? #140

Open
davidlougheed opened this issue May 4, 2021 · 0 comments
Assignees

Comments

@davidlougheed
Copy link

right now, mergeSTR splits the file list by itself. however, argparse can take a list of items (including what is expanded out from a glob, like *.vcf.gz in the following way:

req_group.add_argument("--vcfs", help="...", type=str, nargs="+", required=True)

Then, this will pre-split VCFs by whitespace and let someone run something like

mergeSTR --vcfs *.vcf.gz --out something

You could keep backwards compatibility even with comma-separated arguments by doing something like this, although it's a bit janky and prevents filenames with commas in them (which mergeSTR already does)

filenames = args.vcfs[0].split(",") if len(args.vcfs) == 1 else args.vcfs
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

No branches or pull requests

3 participants