This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How Can I Convert Novoalign Output Format To Sam Or Bam?

Hi, I have been using the novoalign to align short reads. So far I have been using the native output of the novoalign for all of my work. But now I need to do something for which there are better and elegant tools available from the community. I would like to harness this collective intelligence in my work. But my bottle-neck is in converting the native novoalign output to SAM/BAM. Is there a simple way to do this?

bam sam

It seems that novoalign comes with a helper script called novo2sam.pl. This pretty much does the trick.

As a note for future reference, novo2sam.pl does not produce a header in the SAM file, which might be annoying for samtools. See the last post by colin here for a workaround to add the header afterwards.

I have some novoalign files I need to convert to sam and, although the novo2sam.pl script works, the link above is dead. No headers = no samtools = no luck!

Since the link above is dead, I have produced a modified version of novo2sam.pl that allows a header to be added to the files, using the option -h <header.txt>. Please note that header.txt is written verbatim to the beginning of the novo2sam.pl output and it is up to the user to ensure that it is complete and matches the input. The modified script is available at https://github.com/adadiehl/novo2sam

1 answer

For quite some time, novoalign has produce SAM output with the "-o SAM" option.

novoalign -h

...<snip>...
Options for reporting:
-o format [readgroup]
               Specifies the report format. Native, Pairwise, SAM. Default is Native. 
               Optionally followed by SAM @RG record.
               Refer to manual for details additional options.

Perhaps you have a very old version?

Using this you could create BAM with a pipeline:

novoalign [OPTIONS] -o SAM | samtools view -Sb - > reads.aln.bam

I am using V2.07.10 and it has this option.

actually some of my analysis was done more than a year ago, and some was done last week. So I have old and new files. I guess the novo2sam.pl will get my job done. I will post the progress here.

Log in to answer this question.