DerrickWood / kraken2

The second version of the Kraken taxonomic sequence classification system
MIT License
711 stars 271 forks source link

Separate into single individuals? #308

Open heather340 opened 4 years ago

heather340 commented 4 years ago

I have successfully run through Kraken using transcriptomic reads of two groups of individuals (wild, n=3 and relocated, n=4). I did this by concatenating the read files into a single file:

cat *relocated_L.fq.gz > all_relocated_left.fq.gz

However, for statistical analysis I'd like to separate the results by individual to have multiple individuals in each treatment. I see two alternative methods to fix this:

A) Is there a way to do this post-hoc, or do I need to run through Kraken again individual by individual?

B) Run through Kraken seven times, by individual. However, if I need to run through it by individual, I'm having difficulty doing so as it isn't picking up my fq.gz files: (new_bracken) -bash-4.2$ kraken2 --db mussel_prot --threads 8 --use-names --paired reads/2_relocated_L_trimmed.fq.gz reads/2_relocated_R_trimmed.fq.gz --output output/musselprot/individual_musselprot/kraken_relocated_MP_2 --classified-out output/musselprot/kraken_relocated_MP_2 reads/2_relocated_L_trimmed.fq.gz reads/2_relocated_R_trimmed.fq.gz

Loading database information... done. 0 sequences (0.00 Mbp) processed in 0.001s (0.0 Kseq/m, 0.00 Mbp/m). 0 sequences classified (-nan%) 0 sequences unclassified (-nan%)

Any suggestions are welcome!

jenniferlu717 commented 4 years ago

If you can distinguish between each individual in the readIDs, you can sort and split up the kraken output file. but that would require individual information to be in the readIDs themselves. We do not have a script right now that can split them for you.

heather340 commented 4 years ago

Ok, thank you Jennifer! Sounds like I should then figure out why single individuals aren't able to run with Kraken and run them singly. I don't have that many so it shouldn't be that big of an issue... once I am able to get them running :)

Thanks! Heather