bpnet-lite icon indicating copy to clipboard operation
bpnet-lite copied to clipboard

Small fixes.

Open adamyhe opened this issue 5 months ago • 3 comments

Hi Jacob,

Thanks for the update. I noticed a couple of bugs.

  1. tangermeme version requirement should be updated to 0.5.0 since bpnet-lite now uses example_to_fasta_coord.

  2. I believe that the sequences should be converted to float here (the line should read X = X.cuda().float(), like what's used in the training loop in bpnet.py). I'm getting a dtype mismatch error when trying to train ChromBPNet models.

adamyhe avatar Jun 16 '25 00:06 adamyhe

Thanks for the pointer. My last round of revisions focused on updating the BPNet code and my next round will be on updating the ChromBPNet code (and addressing Anshul's concerns), so I'll be incorporating these soon.

jmschrei avatar Jun 20 '25 14:06 jmschrei

https://github.com/jmschrei/bpnet-lite/blob/f41a4387026e2471ec42e6be5d9ffdc36bd7f4bc/bpnetlite/io.py#L94 and https://github.com/jmschrei/bpnet-lite/blob/f41a4387026e2471ec42e6be5d9ffdc36bd7f4bc/bpnetlite/io.py#L99 need fallbacks for when no controls are supplied.

adamyhe avatar Oct 12 '25 03:10 adamyhe

https://github.com/jmschrei/bpnet-lite/blob/master/bpnetlite/chrombpnet.py#L117

The way that the bias profile trimming works here fails when the accessibility and bias models have the same output length. That is, torch.ones(10, 4, 1000)[:, :, 0:-0] yields an empty tensor. I think the correct trimming should be:

y_profile = acc_profile + bias_profile[:, :, w:bias_profile.shape[-1]-w]

adamyhe avatar Nov 04 '25 04:11 adamyhe