Closed levitsky closed 4 months ago
After merging #142, I changed this PR so that the warning is triggered in TextReaderMixin.build_byte_index
. If IndexSavingMixin.build_byte_index
is successful in reading the index from the external file, the warning is not raised.
This addresses https://github.com/levitsky/pyteomics/issues/134#issuecomment-1850726407 by raising a warning if an
IndexedTextReader
creates an empty offset index.IndexedMGF
has a customized warning text, additionally advising to toggleindex_by_scans
.Would this be a welcome change? A possible point of concern is that the warning is triggered regardless of "Index Saving", i.e. it doesn't matter if the index is built or just read from a file. Would we want to silence it if it's read from a file? Did I perhaps miss anything else?