Ivarz / Conifer

Calculate confidence scores from Kraken2 output
BSD 2-Clause "Simplified" License
20 stars 7 forks source link

Missing output #1

Closed Midnighter closed 4 years ago

Midnighter commented 4 years ago

I wanted to try out your tool as you recommended in my issue on kraken. I started it with:

./conifer --both_scores -s -i kraken.out.txt -d /scratch/databases/Standard_v2/taxo.k2d

then saw output

1000000 lines processed...                                                                                                                                                                    
2000000 lines processed...        
3000000 lines processed...
4000000 lines processed...
5000000 lines processed...
6000000 lines processed...
7000000 lines processed...
8000000 lines processed...
9000000 lines processed...
10000000 lines processed...
11000000 lines processed...
12000000 lines processed...
13000000 lines processed...
14000000 lines processed...
15000000 lines processed...
16000000 lines processed...
17000000 lines processed...
18000000 lines processed...
19000000 lines processed...
20000000 lines processed...
21000000 lines processed...
22000000 lines processed...
23000000 lines processed...
24000000 lines processed...
25000000 lines processed...
26000000 lines processed...
27000000 lines processed...
28000000 lines processed...
29000000 lines processed...
30000000 lines processed...
31000000 lines processed...
32000000 lines processed...
33000000 lines processed...
34000000 lines processed...
35000000 lines processed...
36000000 lines processed...
37000000 lines processed...
38000000 lines processed...
39000000 lines processed...
40000000 lines processed...
41000000 lines processed...
42000000 lines processed...
taxon_name      taxid   reads   P25_conf        P50_conf        P75_conf        P25_rtl P50_rtl P75_rtl

I expected to see more in the table. Any ideas what could cause this?

Ivarz commented 4 years ago

Hi, can you provide me with a sample of your input (lets say first 100 lines) and the taxo.k2d file?

Midnighter commented 4 years ago

I must admit that I'm not sure any longer on which file I tested this. I've had some success with other reports in the meantime. One thing I noticed is that I include taxa with zero assigned reads in the report and conifer includes those, too. That's not very useful and those lines could be excluded I think.

I also had one report with ~30,000 lines which lead to a segmentation fault.

./conifer: unrecognized option '--both-scores'
Segmentation fault (core dumped)

I think the message ./conifer: unrecognized option '--both-scores' is a false hint since the flag works fine with other reports.

Midnighter commented 4 years ago

Okay, I have been able to retrace the error above, it happens when running conifer on the kraken standard output rather than the report. So that's my fault. However, the points above remain. I could send you the report that leads to a segmentation fault by email if you like.

Ivarz commented 4 years ago

If conifer fails with kraken standard output, I would definitely be interested in checking the input files to make the software more robust. As for kraken reports - Conifer, at least currently, is not designed to accept them as input. Conifer generates reports from kraken standard output.

Midnighter commented 4 years ago

Okay, I'll send you the files and maybe you can figure out what is going on.

Ivarz commented 4 years ago

It seems that the issue was with the taxid field in the input file. Conifer assumed that the field contains only the taxid, without names. I updated the code, to extract taxid from input, when kraken is executed with --use-names option. See if it works now.

Midnighter commented 4 years ago

That works for me, thank you! Any idea why I get the following message, though?

./conifer: unrecognized option '--both-scores'
Ivarz commented 4 years ago

I believe it's a typo. Option should be provided with an underscore (--both_scores) or you can use the short version (-b)

Midnighter commented 4 years ago

Doh :facepalm: thanks :slightly_smiling_face: