DaehwanKimLab / centrifuge

Classifier for metagenomic sequences
GNU General Public License v3.0
235 stars 73 forks source link

centrifuge_report.tsv empty, but classification results exist #216

Open jessicarowell opened 2 years ago

jessicarowell commented 2 years ago

Hi there!

What does it mean if my report file is empty, but I have a lot of classification results (redirected with -S flag)? This is how I have run the command:

centrifuge -q -t --met-file centrifuge/metrics.txt -p 8 -x /home/ref/centrifuge/hpvc -1 qc/myreads_R1.fastq.gz -2 qc/myreads_R2.fastq.gz --report-file centrifuge/centrifuge_report.tsv -S centrifuge/defaults.out

Some example output in defaults.out (# lines = 11,502,556):

readID  seqID   taxID   score   2ndBestScore    hitLength       queryLength     numMatches
MN01326:1:000H2YF5M:1:11102:7869:1241   NC_000001.11    9606    20402   0       232     264     1
MN01326:1:000H2YF5M:1:11102:4160:1241   NW_021160023.1  9606    2592    2592    102     102     5
MN01326:1:000H2YF5M:1:11102:4160:1241   NC_000021.9     9606    2592    2592    102     102     5
MN01326:1:000H2YF5M:1:11102:4160:1241   NT_187388.1     9606    2592    2592    102     102     5
MN01326:1:000H2YF5M:1:11102:4160:1241   NT_167214.1     9606    2592    2592    102     102     5
MN01326:1:000H2YF5M:1:11102:4160:1241   NC_000008.11    9606    2592    2592    102     102     5

centrifuge_report.tsv just consists of the header with no contents.

Thanks!

jessicarowell commented 2 years ago

Update: I just had some time to test this. This is a bug.

If you specify --met-file metrics.txt, then nothing will be written to centrifuge_report.tsv.

You can specify (or not) both -S classification.out and/or --report-file out/centrifuge_report.txt and in both cases, data will be written to centrifuge_report.txt. But if you specify the --met-file option, nothing is written to centrifuge_report.tsv.

It would be nice if this bug could be fixed. I really enjoy this tool, but I'd like to have the metrics data too. Thank you!