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.
cross-post with Biology.SE: http://biology.stackexchange.com/questions/2071/blastn-format-to-sam-bam
@Michael I voted to close on biology since this is really a bioionformatics question and hence better suited on here.
Ok, I also voted to close.
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..