Question: Blastn Format To Sam/Bam?
1
gravatar for Shaojiang Cai
8.5 years ago by
Shaojiang Cai100
Singapore
Shaojiang Cai100 wrote:

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.

bam sam blastn • 3.1k views
ADD COMMENTlink modified 6.4 years ago by Biostar ♦♦ 20 • written 8.5 years ago by Shaojiang Cai100

cross-post with Biology.SE: http://biology.stackexchange.com/questions/2071/blastn-format-to-sam-bam

ADD REPLYlink written 8.5 years ago by Michael Kuhn5.0k

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

ADD REPLYlink written 8.5 years ago by Konrad Rudolph140

Ok, I also voted to close.

ADD REPLYlink written 8.5 years ago by Michael Kuhn5.0k

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 REPLYlink written 6.4 years ago by 5heikki9.0k
2
gravatar for Rm
8.5 years ago by
Rm8.0k
Danville, PA
Rm8.0k wrote:

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

ADD COMMENTlink written 8.5 years ago by Rm8.0k
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: 1714 users visited in the last hour