The kraken output file could be very large (hundreds of Mb or even larger), so I think it could be more disk efficient if recentrifuge could read compressed as well as uncompressed kraken outputs.
So I just use fileinput to read compressed as well as uncompressed kraken output files, the code is simple:
import library fileinput in the beginning
import fileinput
use fileinput to read kraken output file by using openhook=fileinput.hook_compressed
with fileinput.input(output_file, openhook=fileinput.hook_compressed) as file:
The kraken output file could be very large (hundreds of Mb or even larger), so I think it could be more disk efficient if recentrifuge could read compressed as well as uncompressed kraken outputs.
So I just use fileinput to read compressed as well as uncompressed kraken output files, the code is simple:
import library fileinput in the beginning
import fileinput
use fileinput to read kraken output file by using
openhook=fileinput.hook_compressed
with fileinput.input(output_file, openhook=fileinput.hook_compressed) as file: