Skip to content

Commit 057db43

Browse files
Merge pull request #1137 from kimmanbo/fix/soft-split-error-message
Error message clarification for soft-split trial on compressed database
2 parents d401e78 + 99a9602 commit 057db43

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎src/util/splitsequence.cpp‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,22 @@ int splitsequence(int argc, const char **argv, const Command& command) {
3939
return EXIT_SUCCESS;
4040
}
4141

42+
if (par.sequenceSplitMode == Parameters::SEQUENCE_SPLIT_MODE_SOFT && reader.isCompressed()) {
43+
Debug(Debug::ERROR) << "Cannot soft-split compressed input database " << par.db1 << ".\n"
44+
<< "The database contains sequences exceeding --max-seq-len (" << par.maxSeqLen
45+
<< "), but --sequence-split-mode 1 requires uncompressed sequence data.\n"
46+
<< "Use an uncompressed input database or hard splitting with '--sequence-split-mode 0'.\n"
47+
<< "Warning: hard splitting writes a new sequence database and may require substantial additional disk space.\n";
48+
reader.close();
49+
return EXIT_FAILURE;
50+
}
51+
4252
DBReader<DBKeyType> headerReader(par.hdr1.c_str(), par.hdr1Index.c_str(), par.threads, DBReader<DBKeyType>::USE_INDEX|DBReader<DBKeyType>::USE_DATA);
4353
headerReader.open(DBReader<DBKeyType>::NOSORT);
4454

4555
if (par.sequenceSplitMode == Parameters::SEQUENCE_SPLIT_MODE_SOFT && par.compressed == true) {
46-
Debug(Debug::WARNING) << "Sequence split mode (--sequence-split-mode 0) and compressed (--compressed 1) can not be combined.\nTurn compressed to 0";
56+
Debug(Debug::WARNING) << "Soft splitting (--sequence-split-mode 1) cannot create a compressed output database.\n"
57+
<< "Continuing with --compressed 0.\n";
4758
par.compressed = 0;
4859
}
4960

0 commit comments

Comments
 (0)