Closed snystrom closed 3 years ago
Thanks! Could you send a pull-request for that patch or a generalization of it? Happy to merge it. I've only been working with double-stranded data so many of the tools, especially the downstream interpretation ipython notebooks will only work with double-stranded data.
Sure. Although I'm not sure the best way to detect whether there are any negative predictions. I haven't spent a ton of time digging into your API, so not sure the best way to make this work for both use cases.
Added the fix here: https://github.com/kundajelab/bpnet/commit/b9ec3e977ad3159ef4cab9c0d1e8474ffaa6c733. LMK if that doesn't solve the issue.
I trained a model on some unstranded data but got the following error during bw export:
Looking at the line it's:
https://github.com/kundajelab/bpnet/blob/8d639405ea3974d8c097a5ca4508a0d56ca3efe0/bpnet/BPNet.py#L408
which exports the negative preds. Since my data don't have negative preds, my guess is that axis is empty. To test whether this was the issue, I commented out Line 408 and Line 335:
https://github.com/kundajelab/bpnet/blob/8d639405ea3974d8c097a5ca4508a0d56ca3efe0/bpnet/BPNet.py#L335
I replaced 335 with an array lacking the
preds.neg
entry. Rebuilt & that works fine.So it seems there needs to be a check somewhere to determine whether the model has negs or not.