Question: Convert blast tabular output to bed format
1
gravatar for Denis
2.2 years ago by
Denis190
Denis190 wrote:

I need to convert blast output in tabular format (format 6) to bed format. I'm interested only in qstart and qend coordinates (the 7th & 8th columns respectively). As far i know bed format is 0-based, but blast probably uses 1-based coordinates. Am i right?

So to do so with AWK i need to execute the code below:

cat balst_tabular_output.txt | awk '{print($2"\t"$7-1"\t"$8)}' > blast_otput.bed
genome • 1.6k views
ADD COMMENTlink written 2.2 years ago by Denis190

I've manually checked blast output and corresponding query sequences. So, blast definitely uses 1-based coordinates.

ADD REPLYlink written 2.2 years ago by Denis190
3
gravatar for cschu181
2.2 years ago by
cschu1812.4k
cschu1812.4k wrote:

Yes, BLAST is 1-based and your conversion should be right (keeping qend 1-based makes it compatible with the open interval style that bed uses.)

ADD COMMENTlink written 2.2 years ago by cschu1812.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1583 users visited in the last hour