-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
pybigwig version: 0.3.18
When I tried adding entries of int type 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)
, 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.
Metadata
Metadata
Assignees
Labels
No labels