bbcf / bbcflib

Internal utility modules for the BBCF
http://bbcf.epfl.ch/bbcflib
GNU General Public License v3.0
7 stars 4 forks source link

Check chrName contents against tables #6

Closed bioinfornatics closed 13 years ago

bioinfornatics commented 13 years ago

SQLite file could be "corrupted" if there is in table chrNames some entry that have not a corresponding table. So it would be useful to perform a test before calling with statement

xapple commented 13 years ago

Performing this test can't do any harm. If you want to add it to the library, go ahead ! But why do you want to test the chromosomes tables in the __enter__ method ? The test should rather be done in the __exit__ method to check that the library leaves the track file in a sane state before closing it.