bracken not accepting SampleData[Kraken2Report % Properties('contigs')]

Hi,

I'm trying to run the following workflow:

qiime assembly assemble-spades --i-seqs reads.qza --o-contigs spades_contigs.qza

qiime moshpit classify-kraken2 --i-kraken2-db kraken_db.qza \
--i-seqs spades_contigs.qza --o-reports \
kraken_reports --o-hits kraken_hits

qiime moshpit estimate-bracken --i-kraken-reports kraken_report.qza \ 
  --i-bracken-db bracken_db.qza \
  --o-taxonomy bracken_taxonomy \
  --o-table bracken_ft \
  --o-reports bracken_reports

I'm using qiime-metagenome-2024.10.

The problem I'm running into is that the type I get out of spades is SampleData[Contigs], which classify-kraken uses. However, bracken is then unable to take SampleData[Kraken2Report % Properties('contigs')] as input, only SampleData[Kraken2Report % Properties('reads')]. When I look at the Kraken2 report.txt I cannot see any differences between the reports generated from reads vs. those generated from contigs. I was also able to re-import the contig_report.txt as SampleData[Kraken2Report % Properties('reads')].

Is this expected behavior? Should I be able to use contigs with bracken?

Here is the error message I'm getting:

Invalid value for '--i-kraken-reports': Expected an artifact of at
  least type SampleData[Kraken2Report % Properties('reads')]. An artifact of
  type SampleData[Kraken2Report % Properties('contigs')] was provided.

Thanks!

1 Like

Hi @mled,

This error is telling you that you can not feed in contigs, i.e. the spades_contigs.qza file into qiime moshpit estimate-bracken... as bracken requires read information. Thus, you con only feed in the output from classification of your reads, not the contigs. More details can be found here, and within the bracken manual.

2 Likes

Ah ok, so it is expected behavior. I was missing that bracken uses read length to estimate abundances. Thanks!

2 Likes