Open nvictus opened 1 day ago
import pybigtools as pbt f = pbt.open("/tmp/foo.bb", "w") f.write( {"chr1": 1000, "chr2": 1000}, [ ("chr1", 0, 100, "foo\tbar\t3"), ("chr2", 100, 200, "xxx\tyyy\t1.0"), ("chr2", 200, 300, "zzz\twww\t1.0") ] ) f.close() f = pbt.open("/tmp/foo.bb", "r") list(f.records("chr2"))
[(100, 200, 'chr2'), (200, 300, 'chr2')]
print(f.sql())
table bed3 "Simple bed" ( string chrom; "Reference sequence chromosome or scaffold" uint chromStart; "Start position in chromosome" uint chromEnd; "End position in chromosome" )
Uh, that's weird.