Blastn Format To Sam/Bam?
1
1
Entering edit mode
12.6 years ago
Shaojiang Cai ▴ 100

I am trying to align some contigs to a reference genome using Blastn. But I need to convert the result to BAM file for visualization. I found some thread talking that blast2sam.pl from samtools can do this. But when I run it, I got this error:

Use of uninitialized value $qend in subtraction (-) at ./blast2sam.pl line 58, <> line 6200808.
Use of uninitialized value $qlen in subtraction (-) at ./blast2sam.pl line 58, <> line 6200808.
Use of uninitialized value $sam in join or string at ./blast2sam.pl line 72, <> line 6200808.
gi|348546453|ref|XM_003460645.1|    0        0    255    0M    *    0    0    **    AS:i:93    EV:Z:4e-17

How to fix this problem? Or is there any other tool that helps? Thanks.

blastn sam bam • 4.3k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

@Michael I voted to close on biology since this is really a bioionformatics question and hence better suited on here.

ADD REPLY
0
Entering edit mode

Ok, I also voted to close.

ADD REPLY
0
Entering edit mode

What software are you using for visualization? If by any chance it supports gff, you should go for that instead because parsing tabular blastn output to gff is rather simple..

ADD REPLY
2
Entering edit mode
12.6 years ago
Rm 8.3k

check this post: http://www.biostars.org/post/show/13449/error-running-blast2sampl/ @Nicolau had modified the script.

ADD COMMENT

Login before adding your answer.

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