start and stop position of mapping in Blast
1
1
Entering edit mode
10.5 years ago

I used makeblastdb to search many short fasta sequences in a known organism. I successfully completed this step and got the mappings. My question is

How can I get the start and stop coordinate?

for eg

Query  1        AATATAGGTGGTACCACGGAATATCCGTCCTATTTGTATATAGGATGGATAtttttattt  60
                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sbjct  1765181  AATATAGGTGGTACCACGGAATATCCGTCCTATTTGTATATAGGATGGATATTTTTATTT  1765122

Query  61       ttttAGGAGGTATAGCAAATGG  82
                ||||||||||||||||||||||
Sbjct  1765121  TTTTAGGAGGTATAGCAAATGG  1765100

How to get 1765100 and 1765181 from a text file with many mappings like this. I would also like to count the number of mappings or query sequences?

blast • 6.1k views
ADD COMMENT
2
Entering edit mode

use tabular output option:

blastn -query some.fa -db some.fa  -outfmt 6
ADD REPLY
0
Entering edit mode

Thank You :)

ADD REPLY
2
Entering edit mode

Every bioinformatics journey begins with a BLAST parser :)

ADD REPLY
4
Entering edit mode
10.5 years ago
blastn -query some.fa -db some.fa  -outfmt 6 | awk '{print $9 "\t" $10}'
ADD COMMENT
2
Entering edit mode

in case alignment of query is in opposite direction to subject, then column 9 will be greater than column 10

blastn -query query.fa -db subject.fa  -outfmt 6 | awk '{OFS="\t"; if ($9>$10) print $9,$10; else print $10,$9}'
ADD REPLY
0
Entering edit mode

Have in mind that sometimes $9 is greater than $10.

Also, there is no point in your answer as you're blasting some.fa against some.fa.

ADD REPLY
0
Entering edit mode

there are some cases when you run blast using query both as query and as subject, clustering groups of sequences for example.

ADD REPLY

Login before adding your answer.

Traffic: 2585 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