Hi all,
Just wondering if anyone else ran into this issue (or if it is an issue at all). Kraken2 allows users to obtain their classified or unclassified reads separately using either ---classified-out
or --unclassified-out
, respectively.
Now, when using --classified-out
with paired-end data (i.e. using --paired
and then calling R1 and R2 files), I get my output as one file. However, this does not work with --unclassified-out
and I do not know why that is the case. I get an unclassified file for each read sample (so a sample1.unclassified_1.out and a sample1.unclassified_2.out to correspond to R1 and R2 respectively).
Is there a way to modify my code (below) so I can just get one combined unclassified output. That way, when I blast the reads I won't be blasting the same thing twice.
My code:
for R1 in ${INPUTS} # inputs being the directory with my reads
do
PREFIX=${R1%%_unmapped*}
R2="${PREFIX}_unmapped_R2.fastq"
kraken2 --threads 32 --db $DB --paired $R1 $R2 --unclassified-out ${PREFIX}.unclassified#.fastq
done
Thank you!
Hmm, I think I made an error then when using
--classified-out
I don't think I used the "#" classifier in the output files. So yes they should have produced two files. I just thought it was pointless blasting R1 and R2 reads as I can see they are giving me the same output for the same read pair..most of the time R1 and R2 should classify/align the same way, the more interesting/concerning cases are those when the two reads align to different organisms