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

Standard input incorrect when including subcommand flags #6

Closed
btski opened this issue Dec 20, 2022 · 1 comment
Closed

Standard input incorrect when including subcommand flags #6

btski opened this issue Dec 20, 2022 · 1 comment

Comments

@btski
Copy link
Contributor

btski commented Dec 20, 2022

I tried to use cat test.fasta | smof grep -f test.txt and got a "ShitInput" error. This only occurs when a subcommand flag is invoked when trying to pipe from standard input. I added default=sys.stdin to all file arguments. I then encountered TypeError: can only concatenate list (not "_io.TextIOWrapper") to list in the main function. This was simply resolved by overwriting fh entirely instead of appending. Since the default value of fh is now standard input, appending text is not compatible. I also considered the additional conditionals to be unnecessary.

Created pull request #5 with proposed solution. Tested with the following:
cat test.fasta | smof grep -f test.txt
smof grep -f test.txt test.fasta

@arendsee
Copy link
Collaborator

Ah, quite right. I'll accept the pull request. Thanks!

I should probably remove that shit also.

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

2 participants