BigBed.ReaderMethod
BigBed.Reader(input::IO)

Create a reader for bigBed file format.

Note that input must be seekable.

BigBed.RecordMethod
BigBed.Record()

Create an unfilled bigBed record.

BigBed.WriterMethod
BigBed.Writer(output::IO, chromlist; binsize=64)

Create a data writer of the bigBed file format.

Arguments

  • output: data sink
  • chromlist: chromosome list with length
  • binsize=64: size of a zoom with the highest resolution

Examples

output = open("data.bb", "w")
writer = BigBed.Writer(output, [("chr1", 12345), ("chr2", 9100)])
write(writer, ("chr1", 101, 150, "gene 1"))
write(writer, ("chr2", 211, 250, "gene 2"))
close(writer)
BigBed.blockcountMethod
blockcount(record::Record)::Int

Get the number of blocks (exons) in record.

BigBed.blocksizesMethod
blocksizes(record::Record)::Vector{Int}

Get the block (exon) sizes of record.

BigBed.blockstartsMethod
blockstarts(record::Record)::Vector{Int}

Get the block (exon) starts of record.

Note that the first base is numbered 1.

BigBed.chromMethod
chrom(record::Record)::String

Get the chromosome name of record.

BigBed.chromendMethod
chromend(record::Record)::Int

Get the end position of record.

BigBed.chromidMethod
chromid(record::Record)::UInt32

Get the chromosome ID of record.

BigBed.chromlistMethod
chromlist(reader::BigBed.Reader)::Vector{Tuple{String,Int}}

Get the (name, length) pairs of chromosomes/contigs.

BigBed.chromstartMethod
chromstart(record::Record)::Int

Get the start position of record.

BigBed.itemrgbMethod
itemrgb(record::Record)::ColorTypes.RGB

Get the RGB value of record.

The return type is defined in ColorTypes.jl.

BigBed.nameMethod
name(record::Record)::String

Get the name of record.

BigBed.optionalsMethod
optionals(record::Record)::Vector{String}

Get optional fields as strings.

BigBed.scoreMethod
score(record::Record)::Int

Get the score between 0 and 1000.

BigBed.strandMethod
strand(record::Record)::GenomicFeatures.Strand

Get the strand of record.

BigBed.thickendMethod
thickend(record::Record)::Int

Get the end position at which record is drawn thickly.

BigBed.thickstartMethod
thickstart(record::Record)::Int

Get the starting position at which record is drawn thickly.

Note that the first base is numbered 1.