Closed balathl closed 6 years ago
Not currently but I'm not sure what kind of results you're looking for by adding in multiple levels?
You can just run the command multiple times to get the abundance estimates at the different levels. I don't believe the command would take that much time.
I am aiming my final results in this format. Any comments will be useful. My code was below: (my_biotools_bracken) [bjam@c307 filtered]$ cat run.for.kraken.build.serial.sh
source activate my_biotools_kraken
perl count-kmer-abundances.pl --db /wrk/bjam/challenge/filtered/KrakenDB --read-length=75 --threads=16 stdout_sample01 > database75mers.kraken_cnts python generate_kmer_distribution.py -i database75mers.kraken_cnts -o OUTPUT_database75mers.kraken_cnts.TXT python est_abundance.py -i kraken.sample1.report -k OUTPUT_database75mers.kraken_cnts.TXT -o OUTPUT_FILE_species.TXT python est_abundance.py -i kraken.sample1.report -k OUTPUT_database75mers.kraken_cnts.TXT -o OUTPUT_FILE_genus.TXT --level G echo done
You can just concatenate the output files from each Bracken run. They will give you the taxid, rank, and percentages. You would have to then generate the taxpath and the taxpathsn columns but otherwise, concatenating the output would give you most of what you want.
ok. Thanks! This was the first time i am using bracken. great tool :)
Could you suggest any improvements in the below commands??
perl count-kmer-abundances.pl --db /wrk/bjam/challenge/filtered/KrakenDB --read-length=75 --threads=16 stdout_sample01 > database75mers.kraken_cnts python generate_kmer_distribution.py -i database75mers.kraken_cnts -o OUTPUT_database75mers.kraken_cnts.TXT python est_abundance.py -i kraken.sample1.report -k OUTPUT_database75mers.kraken_cnts.TXT -o OUTPUT_FILE_species.TXT python est_abundance.py -i kraken.sample1.report -k OUTPUT_database75mers.kraken_cnts.TXT -o OUTPUT_FILE_genus.TXT --level G echo done
My fastq reads were 151 basepairs. I have 20 fastq files from 20 samples to analyse.
Thanks in advance!
Bala
I think the commands look fine from my end.
python est_abundance.py -i kraken.sample1.report -k OUTPUT_database75mers.kraken_cnts.TXT -o OUTPUT_FILE_all_levels.TXT --level "D,P,G,S" usage: est_abundance.py [-h] -i INPUT -k KMER_DISTR -o OUTPUT [-l {D,P,C,O,F,G,S}] [-t THRESH] est_abundance.py: error: argument -l/--level: invalid choice: 'D,P,G,S' (choose from 'D', 'P', 'C', 'O', 'F', 'G', 'S')
Is there anyway to include more levels at same command?
Bala