API Reference

Public

Internal

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

Create a reader for bigWig file format.

Note that input must be seekable.

source
BigWig.WriterMethod
BigWig.Writer(output::IO, chromlist; binsize=64, datatype=:bedgraph)

Create a data writer of the bigWig file format.

Arguments

  • output: data sink
  • chromlist: chromosome list with length
  • binsize=64: size of a zoom with the highest resolution
  • datatype=:bedgraph: encoding of values (:bedgraph, :varstep or :fixedstep)

Examples

output = open("data.bw", "w")
writer = BigWig.Writer(output, [("chr1", 12345), ("chr2", 9100)])
write(writer, ("chr1", 501, 600, 1.0))
write(writer, ("chr2", 301, 450, 3.0))
close(writer)
source
BigWig.chromMethod
chrom(record::Record)::String

Get the chromosome name of record.

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

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

source
BigWig.coverageMethod
coverage(reader, chrom, chromstart, chromend; usezoom=false)::Int

Compute the coverage of values in [chromstart, chromend] of chrom.

If usezoom is true, this function tries to use precomputed statistics (zoom) in the file. This is often faster but not exact in most cases.

source
BigWig.maximumMethod
maximum(reader, chrom, chromstart, chromend; usezoom=false)::Float32

Compute the maximum of values in [chromstart, chromend] of chrom.

This function returns NaN32 if there are no data in that range.

See coverage for the usezoom keyword argument.

source
BigWig.meanMethod
mean(reader, chrom, chromstart, chromend; usezoom=false)::Float32

Compute the mean of values in [chromstart, chromend] of chrom.

This function returns NaN32 if there are no data in that range.

See coverage for the usezoom keyword argument.

source
BigWig.minimumMethod
minimum(reader, chrom, chromstart, chromend; usezoom=false)::Float32

Compute the minimum of values in [chromstart, chromend] of chrom.

This function returns NaN32 if there are no data in that range.

See coverage for the usezoom keyword argument.

source
BigWig.stdMethod
std(reader, chrom, chromstart, chromend; usezoom=false)::Float32

Compute the standard deviation of values in [chromstart, chromend] of chrom.

See coverage for the usezoom keyword argument.

source
BigWig.valuesMethod
values(reader::BigWig.Reader, chrom::AbstractString, range::UnitRange)::Vector{Float32}

Get a vector of values within range of chrom from reader.

This function fills missing values with NaN32.

source
BigWig.valuesMethod
values(reader::BigWig.Reader, interval::Interval)::Vector{Float32}

Get a vector of values within interval from reader.

This function fills missing values with NaN32.

source