Blast + Alignment Shell Script
1
0
Entering edit mode
3.8 years 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

I'm not sure about the beginning. Furthermore, I really don't 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 alignment using MAFFT.

Can you help me?

Thanks a lot, I am really stuck for now.

alignment blast shell script • 2.2k 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.

ADD REPLY
0
Entering edit mode

Thank you for your answer.

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

ADD REPLY
0
Entering edit mode
3.8 years 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 blastviewer, as illustrated below: enter image description here enter image description here

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

ADD COMMENT
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)

ADD REPLY
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.

ADD REPLY
0
Entering edit mode

Thank you for your answer !

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

ADD REPLY

Login before adding your answer.

Traffic: 2484 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6