write.wig.feat: Write a features object in fixedStep wig format

Description Usage Arguments Note Author(s) Examples

View source: R/feat.R

Description

Write a features object in fixedStep wig format

Usage

1

Arguments

x

An object of type feat

file

The name of the file to write to. A value of NULL implies write to console.

append

If TRUE, append to the file. Otherwise overwrite.

Note

Wig format only contains chromosome, coordinates, and score. Any other data will be lost.

This function will quit with an error if the elements of x are not all the same length (as required by fixedStep wig format).

If x is stored as a pointer to a C structure, the elements will be sorted by this function.

Author(s)

Melissa J. Hubisz

Examples

1
2
3
4
5
f <- feat(seqname=c("chr1", "chr1", "chr1", "chr1", "chr2"),
          start=c(1, 11, 21, 100, 1),
          end=c(3, 13, 23, 102, 3),
          score=runif(5))
write.wig.feat(f)

Example output

fixedStep chrom=chr2 start=1 step=10 span=3
0.218263
fixedStep chrom=chr1 start=1 step=10 span=3
0.546973
0.92602
0.885988
fixedStep chrom=chr1 start=100 step=10 span=3
0.198775

rphast documentation built on May 1, 2019, 9:26 p.m.