4
$\begingroup$

SAMtools returned an error message for my gzipped genome FASTA:

Indexed block-compressed FASTA file cannot be handled

The source code for the message is here.

// check if the it is a valid block-compressed file
if (IOUtil.isBlockCompressed(path, true)) {
    throw new SAMException("Indexed block-compressed FASTA file cannot be handled: " + path);
}

What's a "block-compressed" file?

$\endgroup$
7
$\begingroup$

A block compression usually refers to compressing your file into a series of small blocks (with a tool like bgzip). This allows indexing in that the index can record which record lives in which block so that the whole file does not need to be decompressed and therefore can be accessed randomly. This isn't true of files compressed as a single block using gzip.

As far as I was aware samtools only works with uncompressed FASTA files.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.