Import a SAM file obtained from BBMap to Megan

Hello, I have a bunch of metagenomic reads but I already separated some of them by aligning them to the phage_nt nr database with BBMap. I kept the reads that aligned to the phage db and now I would like to import them to Megan. I have been reading the manual and some other questions and I’ve tried using both the [nucl_acc2tax-Nov2018.abin] and the [nucl_gi2tax-Aug2016.bin.zip] files, but I’m not getting any read assigned. In order to import my SAM file I click the Import from BLAST option, is it the problem that I should use the sam2rma tool? my SAM file has the @HD header

Thank you :slight_smile:

Hi there! I just done that:
So you don’t need a tool but you will have to change your SAM file:
It starts with an @HD, which is required for MEGAN, but usually all the ID’s of gene bank will follow, and then you will have your sequence ID and sequences. You will need to erase the gene bank’s ID in order to get MEGAN to parse your file.

Then you just import it like a blast file.