Hi,
Not sure whether to consider this a bug, but given that bw.values("chr1", start, end) produces nan values for missing values, it seems that bw.addEntry() with nan values should produce gaps in the output file, rather than writing them as nan as it currently does.
There's a way to create the gaps in compact notation for a numpy.array vector x that contains nan values
valid_idx = ~np.isnan(x)
bw.addEntries(chrom, np.where(valid_idx)[0], values=x[valid_idx], span=1)
but perhaps this is something that should be enforced for consistency?
Hi,
Not sure whether to consider this a bug, but given that
bw.values("chr1", start, end)producesnanvalues for missing values, it seems thatbw.addEntry()withnanvalues should produce gaps in the output file, rather than writing them asnanas it currently does.There's a way to create the gaps in compact notation for a
numpy.arrayvectorxthat containsnanvaluesbut perhaps this is something that should be enforced for consistency?