Dear gb, Thank you for your help. I have been searching homologues sequences of my target gene families in my concerned genome sequences (more than 30 genomes to be searched). I need to search the homologues sequences with a score of > 70% identity and > 40% query length to the target gene families. From the BLAST results, I intended to extract the query sequences (BLAST hit query sequences against the target gene famillies) and then planned to go for multiple sequence alignment followed by gene tree generation. The gene tree to be compared with species tree as specified in various research articles.
Each query genome BLAST hit sequences to be extracted and then put into single fasta file and subjected for MAFFT alignment.
After referring numerous research articles, I adopted this methodology. Please correct me, if i am wrong.
Please use 'code sample' fields while pasting pieces of code to make your post more readable.
Could you had some lines of
msa.xlsin your post pleaseYou do understand
qseqis for aligned part of query sequence. The hit would besseq, i.e. aligned part of the subject sequence.So anyway if that's what you want, you can do like this to remove "-" and "*"
If i remove those - and * special characters from the amino acid sequences, it may create negative effects on my further analysis. My intention is to know, what is meant for * special character, Since I know - meant for gaps. Removing those special characters only is the solution, then its not the right one to do. Could you please suggest me any tool or script to extract the multiple BLAST hit coordinates from the query contigs.
You don't need a script, just check from
blastn -helpwhich fields you want in your output, I'm guessing it's some of these:Dear 5heikki, You have specified BLAST output headers. But, I need to extract the BLAST hit query sequences, based on qstart and qend in the BLAST output, I could use the samtools commands as given below,
But, in samtools, only one set of coordinates can be extracted(qstart to qend). My intention is to extract the query sequences based on the BLAST hit output coordinates (qstart to qend) of multiple BLAST results. Because I have been doing BLAST analysis for single query against multiple subject databases, for example, virulence db, enzymes db etc. Please help me to do the same.
Thank you so much @5heikki. It works perfectly and this is what I exactly need to do. Once again thank you.
Dear 5heikki, I have to specify few parameters/cut-off in the BLAST command line such as,
Is it possible to add the same in the BLAST command line.
Check from
blastn -helpthe fields you need and pipe the blast output intoawkand use it for filteringawk 'BEGIN{OFS=FS="\t"}{if($x>y && $z>w){print $a, $b, $c}}'where the letters correspond to field/column numbers and your desired cutoff values..