Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kraken2 classified first read of the pair and not the other each time when both names are supplied #861

Open
kaydadaemon opened this issue Jul 31, 2024 · 5 comments

Comments

@kaydadaemon
Copy link

I'm running kraken2 with this code

$KRAKEN2 --db $KRAKENDB --threads 20 \
--report ${KRAKEN2_OUTPUT}/${SRR}.kraken2report \
--report-minimizer-data --minimum-hit-groups 3 --report-zero-counts --use-names --gzip-compressed \
--paired ${SRR}_1_val_1.fq.gz ${SRR}_2_val_2.fq.gz \
> ${KRAKEN2_OUTPUT}/${SRR}.kraken2results

The kraken2results show classification for only the forward reads, ${SRR}_1_val_1.fq.gz. When I switch the order, (i.e --paired ${SRR}_2_val_2.fq.gz ${SRR}_1_val_1.fq.gz), it classifies only ${SRR}_2_val_2.fq.gz. When I classify them individually, as single reads, it works fine.

@ChillarAnand
Copy link

Which version of kraken2 are you using?

I don't think I have seen this issue earlier. I generally gunzip, interleave the files with seqfu and then pass the file to kraken2 to improve speed.

$ seqfu interleave -1 SRR6915097_1.fastq.gz -2 SRR6915097_2.fastq.gz > SRR6915097.fastq

More details at https://avilpage.com/2024/07/mastering-kraken2-performance-optimisation.html

@kaydadaemon
Copy link
Author

kaydadaemon commented Aug 1, 2024

Using version 2.1.3. But kraken doesnt work on interleaved files, does it? Single reads, yes, but won't treat interleaved files as alternating paired as it should (I tried with hope of extracting classified reads and assembling and extracted reads didnt add up)

@ChillarAnand
Copy link

Can you try out any publicly available samples and check? Kraken2 supports paired reads.

@kaydadaemon
Copy link
Author

Can you try out any publicly available samples and check? Kraken2 supports paired reads.

I did and those work fine, that's why it's confusing. Wondering if anyone know why or have experienced something similar.

@juanjo255
Copy link

Hello @ChillarAnand,

According to these issues #214, #185 Kraken2 does not handle interleaved paired-end reads, but they need to be concatenated using an "x" or an "N" however it is no clear how it must be done. Do you have a way to do this concatenation? I would like to concatenate to process merged and paired end reads 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants