Learn R Programming

rphast (version 1.6.9)

write.wig: Writing a wig file

Description

Write a fixedStep wig file

Usage

write.wig(chrom, start, score, span = 1, file = NULL, append = FALSE)

Arguments

chrom

A character vector giving chromosome name for each point. Will be recycled to length(start)

start

An integer vector giving start coordinate for each point.

score

A numeric vector giving score at each point Will be recycled to length(start)

span

An integer giving span (ie, length) of each element (all elements must have the same length, so only a single value is allowed).

file

The name of the file to write to (will be overwritten). A value of NULL implies write to console.

append

Whether to append to the file. If FALSE, file will be overwritten.

Examples

Run this code
# NOT RUN {
write.wig(chrom=c("chr1", "chr1", "chr1", "chr1", "chr2"),
          start=c(1, 11, 21, 100, 1),
          span=3,
          score=runif(5))
# }

Run the code above in your browser using DataLab