smdabdoub / kraken-biom

Create BIOM-format tables (http://biom-format.org) from Kraken output (http://ccb.jhu.edu/software/kraken/, https://github.com/DerrickWood/kraken).
MIT License
47 stars 15 forks source link

Bracken input error: "biom.exception.TableException: Cannot delimit self if I don't have data..." #18

Open trfeuerborn opened 2 years ago

trfeuerborn commented 2 years ago

Hello,

I have been trying to run kraken on some bracken files I have but there seems to be an issue of compatibility.

I have been running the command: kraken-biom /PATH/*.bracken --fmt tsv --gzip -o table.tsv

However, I get the following error:

Traceback (most recent call last): File "/home/people/tatfeu/Software/kraken-biom/bin/kraken-biom", line 11, in sys.exit(main()) File "/home/people/tatfeu/Software/kraken-biom/lib64/python3.6/site-packages/kraken_biom.py", line 379, in main out_fp = write_biom(biomT, args.output_fp, args.fmt, args.gzip) File "/home/people/tatfeu/Software/kraken-biom/lib64/python3.6/site-packages/kraken_biom.py", line 228, in write_biom biom_f.write(biomT.to_tsv()) File "/home/people/tatfeu/Software/kraken-biom/lib64/python3.6/site-packages/biom/table.py", line 5096, in to_tsv direct_io=direct_io) File "/home/people/tatfeu/Software/kraken-biom/lib64/python3.6/site-packages/biom/table.py", line 1583, in delimited_self raise TableException("Cannot delimit self if I don't have data...") biom.exception.TableException: Cannot delimit self if I don't have data...

I have looked and the bracken files are all accounted for and contain tab delimited data. I have tried running with json output as well and although I don't receive an error the output only contains column names and no data.

Can bracken files be used with kraken? If they can do you know what the root of this error might be?

Thanks

smdabdoub commented 2 years ago

Hi @trfeuerborn,

I have not tried it yet with bracken files (although it has been on my list for a while). And you're the third person who's posted an issue on this recently, so this is a good time to start looking into it.

If you don't mind sharing a few of your bracken output files, I would be happy to take a look and figure out what the issue is. You can send any files to shareef-dabdoub (care of) uiowa.edu

trfeuerborn commented 2 years ago

Hi Shareef,

Thanks for the reply. That would be great! I will send you an email with a few bracken files in our dataset.

On Thu, 10 Feb 2022 at 23:37, Shareef Dabdoub @.***> wrote:

Hi @trfeuerborn https://github.com/trfeuerborn,

I have not tried it yet with bracken files (although it has been on my list for a while). And you're the third person who's posted an issue on this recently, so this is a good time to start looking into it.

If you don't mind sharing a few of your bracken output files, I would be happy to take a look and figure out what the issue is. You can send any files to shareef-dabdoub (care of) uiowa.edu

— Reply to this email directly, view it on GitHub https://github.com/smdabdoub/kraken-biom/issues/18#issuecomment-1035603046, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANTV43IWOHX6ROFPVOPIAC3U2Q435ANCNFSM5OAYEFVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--

Tatiana R. Feuerborn, Ph.D., Ph.D. Postdoctoral Researcher

magibc commented 2 years ago

Hi,

I have the same problem. I would like to use Kraken2 + Bracken before to implement kraken-biom in order to construct a phyloseq object.

I have tried kraken-tools (kreport2mpa.py and combine_mpa.py) and I was able to construct phyloseq object but only for species taxonomic rank but not for the others.

I know that @trfeuerborn opened this issue 28 days ago (which is very recent) but I would like to know if it's an issue that will be implemented in kraken-biom to be capable to use as input bracken report files.

Thanks for your comments @smdabdoub

David.

archanamadhav commented 2 years ago

Hello, did you manage to figure out why this error occurred? I am facing the same issue with phylum-level classification.

Very odd, since I successfully ran it on species level bracken report files (i.e. with .kreport2 file extension) previously and it worked fine... :/