API Reference
Public
Internal
BigWig.Reader — MethodBigWig.Reader(input::IO)Create a reader for bigWig file format.
Note that input must be seekable.
BigWig.Record — MethodBigWig.Record()Create an unfilled bigWig record.
BigWig.Writer — MethodBigWig.Writer(output::IO, chromlist; binsize=64, datatype=:bedgraph)Create a data writer of the bigWig file format.
Arguments
output: data sinkchromlist: chromosome list with lengthbinsize=64: size of a zoom with the highest resolutiondatatype=:bedgraph: encoding of values (:bedgraph,:varstepor: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)BigWig.chrom — Methodchrom(record::Record)::StringGet the chromosome name of record.
BigWig.chromend — Methodchromend(record::Record)::IntGet the end position of record.
BigWig.chromid — Methodchromid(record::Record)::UInt32Get the chromosome ID of record.
BigWig.chromlist — Methodchromlist(reader::BigWig.Reader)::Vector{Tuple{String,Int}}Get the (name, length) pairs of chromosomes/contigs.
BigWig.chromstart — Methodchromstart(record::Record)::IntGet the start position of record.
BigWig.coverage — Methodcoverage(reader, chrom, chromstart, chromend; usezoom=false)::IntCompute 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.
BigWig.maximum — Methodmaximum(reader, chrom, chromstart, chromend; usezoom=false)::Float32Compute 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.
BigWig.mean — Methodmean(reader, chrom, chromstart, chromend; usezoom=false)::Float32Compute 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.
BigWig.minimum — Methodminimum(reader, chrom, chromstart, chromend; usezoom=false)::Float32Compute 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.
BigWig.std — Methodstd(reader, chrom, chromstart, chromend; usezoom=false)::Float32Compute the standard deviation of values in [chromstart, chromend] of chrom.
See coverage for the usezoom keyword argument.
BigWig.value — Methodvalue(record::Record)::Float32Get the value of record.
BigWig.values — Methodvalues(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.
BigWig.values — Methodvalues(reader::BigWig.Reader, interval::Interval)::Vector{Float32}Get a vector of values within interval from reader.
This function fills missing values with NaN32.