BAM file from HISAT2 to fastq for Genome assembly

Hi friends!,

I would like to ask if you know of any tools to convert BAM alignment files (which I generated in Galaxy using HISAT2) into FASTQ files, suitable for genome assembly. I used bedtools bamtofastq, but I received a warning. Is this normal?

Hi @John_Kim

The warning we can see is about unpaired reads inside the original BAM. Most assembly tools that accept paired reads will expect those to be intact pairs. Your fastq files will probably need to be filtered now.

However, you were mapping to filter the reads, correct? If you filtered the BAM first, then extracted the reads, you might prefer that set of reads for assembly. Right now any sequence with any hit is being output.

Search the tool panel with “filter bam” to find the tool choices. Proper pairs, primary alignments, removing unmapped, and some minimum mapQ values are common choices for many analysis paths but which to use are your choices.

To see the full logs and warning, review the stderr/stdout messages from the tool on the Job Details view (using the i-info icon).

Hope this helps and we can follow up more! :slight_smile:

Good day @jennaj!

I hope you’re doing well. I’m going to retry the steps, starting with the BAM file generated by HISAT2. Next, I plan to filter the BAM file using Filter BAM, correct? Considering my objective is solely to assemble reads and extract the .fastq files from the aligned BAM, what parameters do you recommend I use?

Regards,
John_Kim

Hi @John_Kim

Some of this depends on why you were filtering originally.

You could try different parameters sets, then compare the assemblies, and decide that way? At a minimum you want intact pairs since that is what the assembly tools will expect, and “proper pairs” will ensure those pairs are mapping to the same place, and not other random places in the genome.

Low quality reads – both low technical quality (actual quality scores) and low scientific quality (however you define that) – will increase the chances of complications with any assembly method.

We have assembly tutorials here if interested:

You can also find these same tutorials linked on the bottom of tool forms. Reviewing those will filter by that tool.

Hope this helps! :slight_smile: