philippdre / omniCLIP

omniCLIP is a CLIP-Seq peak caller
GNU General Public License v3.0
15 stars 9 forks source link

Closed h5py handles - FitEmissionParameters #21

Open simojoe opened 4 years ago

simojoe commented 4 years ago

The FitEmissionParameters function make use of if 'Pseudo' in Sequences: statements to verify if the pseudo-gene has been added to the Sequences file. However, if the h5py file handle is closed, the if statement will return a False value without throwing an error. Using if 'Pseudo' in list(Sequences.keys()) will throw an error if the file handle is closed.

This is an issue because several functions called from FitEmissionParameters seem to be returning closed file handles. Therefore the tests at the end of FitEmissionParameters are all being evaluated as False.