This is a test version of Biostars. For the public version, visit https://www.biostars.org.
python blast script

Hi,

I am not familiar with python, and in that case with command line, but got a script from a colleague to blast my contigs on the NCBI nr database. Currently this script can only handle about 40 contigs at a time, and considering my de novo assemblies gives me approximately 800 contigs, it becomes tedious to break it up into sets of 40. I have been trying to research how to automate this process online, but I have no clue.

How can I change the script so that it will automatically blast the sets of 40 contigs, and that the output files aren't overwritten. I would just like to run this script in the background.

Thanks!

blast python

Modifying a script without looking at it ? At least information like how the input is given, how the output is written etc would help.

Anyway why don't you ask your colleague to modify it ? He would be the best person to modify it as he has written the script.

If I were the colleague, I would not like that. I'd have my own stuff to do, and I'm not someone else's maintenance guy. This is an opportunity for OP to learn.

I thought anyway he is asking for help, so why he would not ask his colleague quickly. But I understand what you are saying. :-)

1 answer

The depends on how the script performs its core function, as well as how it writes files. If you share the script on GitHub/paste it in your question (if it is of manageable size), people can give you options.

In all probability, you may have to make a small change to the script and invoke the script in a shell script with either a for loop or GNU parallel (assuming your colleague had the 40 sequence restriction for a reason). If the 40 sequence restriction was arbitrary, you can modify the script and remove this restriction entirely.

Log in to answer this question.