kraken-biom icon indicating copy to clipboard operation
kraken-biom copied to clipboard

empty .biom files from normal-looking bracken reports?

Open mawa86 opened this issue 2 years ago • 4 comments

hi

Im trying to make .biom files from three sets of reports, 1 from kraken2 and 2 from bracken. The kraken2 and first bracken work fine (theyre both down to species level, and i use --fmt json and give a -o FILE NAME). the second bracken collection (i set the level at genus when running bracken here) gives an empty .biom file.

to show what is going on, this is a "normal" .biom file:

head brackenTry_S.biom {"id": "None","format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by": "kraken-biom v1.0.1 (http://github.com/smdabdoub/kraken-biom)","date": "2022-06-20T16:05:23.802520","matrix_element_type": "float","shape": [187, 5],"type": "OTU table","matrix_type": "sparse","data": [[0,0,18139.0],[0,1,152.0],[0,2,14961.0],[0,3,11830.0],[0,4,2683.0],[1,0,9957.0],[1,1,112.0],[1,2,6612.0],[1,3,17086.0],[1,4,12027.0],[2,0,8659.0],[2,1,169.0],[2,2,96.0],[2,3,3599.0],[2,4,119.0],[3,0,891.0],[3,1,177.0],[3,2,2879.0],[3,3,1999.0],[3,4,2521.0],[4,0,746.0],[4,1,858.0],[4,2,477.0],[4,3,228.0],[4,4,219.0],[5,0,386.0],[5,1,96.0],[5,2,257.0],[5,3,1494.0],[5,4,211.0],[6,0,59.0],[6,1,13.0],[6,2,180.0],[6,3,170.0],[6,4,63.0],[7,0,27.0],[7,1,38.0],[7,2,346.0],[7,3,230.0],[8,0,195.0],[8,1,41.0],[8,2,1028.0],[8,3,393.0],[8,4,586.0],[9,0,115.0],[9,2,231.0],[9,3,98.0],[9,4,83.0],[10,0,40.0],[10,2,100.0],

this is the "empty" .biom file:

head brackenTry_G.biom {"id": "None","format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by": "kraken-biom v1.0.1 (http://github.com/smdabdoub/kraken-biom)","date": "2022-06-21T08:48:03.724794","matrix_element_type": "int","shape": [0, 0],"type": "OTU table","matrix_type": "sparse","data": [],"rows": [],"columns": []}

also, when trying to import the "empty" .biom file in phyloseq (R-studio):

> brackenGenuses <- import_biom("brackenTry_G.biom") Error in h(simpleError(msg, call)) : error in evaluating the argument 'object' in selecting a method for function 'otu_table': 'names' attribute [3] must be the same length as the vector [0]

Not sure what happens here. I've inspected all the original kraken2 and bracken report files and there seem to be no issue here, can post examples if needed. Any ideas?

many thanks Martin

mawa86 avatar Jun 21 '22 07:06 mawa86

Hi Martin,

Apologies for the delay in responding. Example files would definitely help here.

Shareef

smdabdoub avatar Oct 07 '22 16:10 smdabdoub

Dear @smdabdoub, the same is happening with me.

Here is an example file: example_bracken_S250.report.txt

gazollavolpiano avatar Feb 03 '23 02:02 gazollavolpiano

@camilagazolla Thank you! I've had less time to work on this than I would have liked, but it's coming.

smdabdoub avatar Feb 08 '23 14:02 smdabdoub

Getting the same issue - anyone have a workaround?

carinogurjao avatar Jun 02 '23 12:06 carinogurjao