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

Accept stdin as input #24

Open
alephreish opened this issue Nov 8, 2015 · 5 comments
Open

Accept stdin as input #24

alephreish opened this issue Nov 8, 2015 · 5 comments
Assignees

Comments

@alephreish
Copy link

A feature request: would be very convenient to have an option to pipe into trimal:

my_pipe | trimal -in /dev/stdin

or

my_pipe | trimal -in -
@scapella scapella self-assigned this Nov 8, 2015
@scapella
Copy link
Collaborator

scapella commented Nov 8, 2015

Good idea - It shouldn't be difficult to implement it in the coming days.
Could you, please, help me to test it once implement it?

@alephreish
Copy link
Author

Sure!

@scapella
Copy link
Collaborator

It is going to take a bit longer than expected because I need to figure out
how to read twice the input data.
Although inefficient it is the only way to determine which format is used
for the input alignment when it is not explicitly specified.

S

On Mon, Nov 9, 2015 at 12:33 AM, Andrey Rozenberg [email protected]
wrote:

Sure!


Reply to this email directly or view it on GitHub
#24 (comment).

Salva

@alephreish
Copy link
Author

I have just discovered the -backtrans option. This is great (!), but the bottleneck is that -backtrans has the same behavior as -in in that it doesn't allow piping. An exemplary workflow would ideally look like:

trimal \
    -in        <(getAAfasta | mafft --amino) \
    -backtrans <(getCDfasta)                 \
> output

(or some syntactic variation thereof), where getAAfasta and getCDfasta are some piping functions with actual sequences coming from a database or some other pipes.

@fgvieira
Copy link

fgvieira commented Jan 6, 2018

@scapella did you end up implementing this?

If not, I guess you can just add an argument where the user can specify the input format, and make it mandatory if reading input from the stdin.

Either way, if this options is specified, then trimal does not try to infer input file format.

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