Blast + Alignement Shell Script
1
0
Entering edit mode
16 months ago

Hello, I currently try to create a shell script to run a blast and then to align the result of my blast Here is the beginning of my script :

 $1 -query$2 -db $3 -outfmt 6 -remote | awk '$3>95' > 4  Im not sure about the begining. Furthermore, i really dont know how i can, from my blast result extract the sequences and put them in a fasta file to run the alignement. Samtools ? I'd like to run the alignement using MAFFT. can you help me ? Thanks a lot , iam really bloqued for now... alignment script blast shell Tutorial • 799 views ADD COMMENT 1 Entering edit mode there is very little info to work on here, eg. what does the 1 $2 ... stand for? I also noticed you have twice $3 but in different places that do not make sense to have the same input.

for extracting sequences based on a blast result you better use blastdbcmd from the blast package, as input for it you will need the DB used and the IDs of the hit sequences.

0
Entering edit mode

I will try that and tell you if it fits my pupose. Thanks again

0
Entering edit mode
16 months ago

Rather than writing a shell script, you might want to try out the extensive features in the BIRCH system that give you a powerful point and click environment for running BLAST, viewing results, retrieving hits, and piping the hits into multiple alignments.

For your purposes, you may be particularly interested in the fact that BLAST output goes to , as illustrated below:

For more information see the BIRCH BLAST tutorial or the BLAST videos on the BIRCH YouTube channel.

0
Entering edit mode

Not saying that this BIRCH interface might not have its merits but most often if you want to write a bash script it's to automated a process to be run in batch, quite the opposite as what a GUI offers, no?

Does BIRCH comes with its own versions of blast or other software or does those have to be available locally already? (could not get that figured out immediately by going through the website)

1
Entering edit mode

You are right, sometimes you want a shell script for processing large numbers or queries. What I will say is that the GUI interfaces in BIRCH give you access to almost all functionality of the programs it runs, and also saves a lot of the trial and error associated with running searches using scripts. There is also the ability to select a bunch of sequences, and then feed all of them into BLAST at once.

BIRCH includes hundreds of popular 3rd party programs such as BLAST preinstalled out of the box. Among the challenges in bioinformatics are installation (every package is different), the learning curve (eg. how to specify paired-end file pairs for different assembly programs) and how to work with output from a given step (eg. from a blast search, there is automated sorting and viewing of hits by size, taxid, Evalue ..., retrieving hits, feeding those hits to multiple alignment programs...)

One of the strengths of BIRCH is that although you can run just about anything through the BioLegato applications, all programs are in the \$PATH, so you can run things at the command line just as easily.

BIRCH is a bit different in its approach from most similar packages, so it is worth watching some of the videos to get a sense of how BIRCH makes complicated things easy.

0
Entering edit mode

BIRCH interface seems to be interesting anyway. I will look at it ! Thanks again !