chipseqFilter {chipseq} | R Documentation

## Filtering ChIP-seq reads

### Description

Convenience for creating an `SRFilter` object appropriate for ChIP-seq data. Typically, the result is passed to `readAligned` when loading reads.

### Usage

    chipseqFilter(exclude = "[_MXY]", uniqueness = c("location", "sequence", "location*sequence", "none"), hasStrand = TRUE)

### Arguments

`exclude` | A regular expression for excluding chromosomes by name. Just like the parameter to `bsapply`.
`uniqueness` | The criteria used to determine whether a read is unique. A read may be unique if it maps to a unique `location`, has a unique `sequence` or both. Specifying `none` avoids this test entirely.
`hasStrand` | Whether to require that the read is mapped to a strand, which usually translates to whether the read was mapped at all.

### Value

An `SRFilter` object

### Author(s)

M. Lawrence

### Examples

    sp <- SolexaPath(system.file("extdata", package="ShortRead"))

    filter <- chipseqFilter()
    aln <- readAligned(sp, "s_2_export.txt", filter=filter)
    ## allow mapping to the same location (but only if sequence is different)
    filter <- chipseqFilter(uniqueness = "sequence")
    aln <- readAligned(sp, "s_2_export.txt", filter=filter)
    ## allow sex chromosomes
    filter <- chipseqFilter(exclude = "[M_]")
    aln <- readAligned(sp, "s_2_export.txt", filter=filter)

[Package chipseq version 1.37.0 Index]