You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pyBigWig
import numpy as np
hg19_chr1_len = 249250621
with pyBigWig.open("/path/to/a/bigwig", "w") as bw:
bw.addHeader([("chr1", hg19_chr1_len)])
bw.addEntries("chr1", [0], values=[0], span=hg19_chr1_len)
, I encountered this error
RuntimeError: You must provide a valid set of entries. These can be comprised of any of the following:
1. A list of each of chromosomes, start positions, end positions and values.
2. A list of each of start positions and values. Also, a chromosome and span must be specified.
3. A list values, in which case a single chromosome, start position, span and step must be specified.
.
After I changed the value type from int to float, like
import pyBigWig
import numpy as np
hg19_chr1_len = 249250621
with pyBigWig.open("/path/to/a/bigwig", "w") as bw:
bw.addHeader([("chr1", hg19_chr1_len)])
bw.addEntries("chr1", [0], values=[0.], span=hg19_chr1_len)
, the code ran successfully. I think it can be good to allow adding entries of int type.
The text was updated successfully, but these errors were encountered:
OK, but it can be good to auto-convert integers to floats or give more
interpretable error messages. The current error message is not helpful to
let people know what is going wrong.
pybigwig version:
0.3.18
When I tried adding entries of int type like
, I encountered this error
.
After I changed the value type from int to float, like
, the code ran successfully. I think it can be good to allow adding entries of int type.
The text was updated successfully, but these errors were encountered: