Genentech / gReLU

gReLU is a python library to train, interpret, and apply deep learning models to DNA sequences.
https://genentech.github.io/gReLU/
MIT License
228 stars 23 forks source link

filter_blacklist doesn't support obtaining custom blacklist from custom genome #9

Closed varsh7777 closed 3 months ago

varsh7777 commented 4 months ago

Hi,

I want to draw attention to a bug that occurs when I try to use a custom blacklist file for my custom genome when calling grelu.data.preprocess.filter_blacklist. The function get_blacklist_file is called before filter_blacklist can check if I have provided a custom path for the blacklist. After entering get_blacklist_file, if a blacklist file associated with the passed in genome does not already exist within the grelu blacklists resources folder, an error is thrown and the function can not continue to check if I have provided a path to a custom blacklist file.

Essentially, the logic in filter_blacklist blocks the function from checking if I have provided a custom blacklist. Instead, it only works when users use genomes in the grelu blacklists resources folder. I believe this error would be resolved if the function checked for a custom blacklist first before checking for a blacklist file in the grelu resources.

Thanks!

gokceneraslan commented 4 months ago

Thanks for reporting this @varsh7777 . Can you send a pull request?

avantikalal commented 3 months ago

Fixed in #36