Hi everybody. I'm new to Prefect and just trying t...
# ask-community
g
Hi everybody. I'm new to Prefect and just trying to build my first workflow so I'd appreciate little help from the community. I want to create a workflow which uses bioinformatics tools that are run from Linux command line. Could someone tell me how to run these tools from the Prefect task? Is it just by using Python's subprocess, sys or os packages, or there's a better way to do this? Thanks in advance.
α
That's actually very interesting: I'm gonna leave a comment so I can see potential answers.
b
Obligatory Bioinformatics nerd here 🏃 sorry I'm late
First thing that comes to mind is the prefect watch command to schedule/execute shell commands as flows
If you'd rather execute a shell command inside of a python script, there's the prefect-shell library too (ie: under certain conditions, run shell command A instead of shell command B)
what bioinformatics tools are you working with, out of curiosity? 👀
g
Hi Bianca. Thanks for the answers, especially for the first one 😂
I'm building a simple gatk pipeline, so standard tools such as bwa, picard, gatk...
cool cool 1
cool llama 1
Is it possible to add a specific docker image to the task?
To be more specific, is it possible to run different tasks or flows on different docker containers?
E.g. to have one image for bwa flow and another for gatk flow
b
For sure! Actually, coincidentally, Αλκιβιάδης asked a similar question that my teammate Nate provided some answers for. Here's a link to their discussion
more examples are coming soon
g
Thank you!