converting .bam to .fastq

I am wondering if there are any plugins that support BAM files? I am new to using Qiime2 and saw that in 2022, @Nicholas_Bokulich mentioned that they were in progress to adding BAM file support. I haven't seen any posts about it since then, so I want to make sure I am not missing something before I use Samtools.

1 Like

Hi @sfreeman ,
What type of data do you have and what exactly do you want to do with it? Samtools is used in a few places in QIIME 2, and bam/sam formats are used, but we do not have it as a stand-alone plugin. So depending on what you want to do, QIIME 2 might have a solution!

2 Likes

Thank you for your help! I have 16S human microbiome data in .bam files. I was actually able to convert them to fastq files and import them to qiime using paired-end-33 PHRED with a manifest file, but it would still be helpful to learn about other ways to import these files for future reference.

Hi @sfreeman ,
Thanks for clarifying. Yes I think that for raw data your solution is best for now. It would be possible to create a transformer so that .bam files could be imported as paired-end sequence data without first converting to .fastq (contributions welcome :wink: ); but I think your question is the first time I have heard of this use case. In QIIME 2 so far we have used bamfiles and samtools more with different read mapping tools, not for handling raw data.

3 Likes